Network & Request Settings
Network Settings
httpsProxy
- Default: null
- Type: url
Un proxy da utilizzare per le richieste HTTPS in uscita. If the HTTPS_PROXY, https_proxy,
HTTP_PROXY or http_proxy environment variables are set, their values will be
used instead.
If your proxy URL contains a username and password, make sure to URL-encode them. Ad esempio:
httpsProxy: "https://use%21r:pas%2As@my.proxy:1234/foo"
Do not encode the colon (:) between the username and password.
Since v11.20.0, an empty value reads as unset instead of failing the install with ERR_PNPM_INVALID_PROXY, so a shell that exports HTTPS_PROXY= simply disables the proxy. Setting the value to false or null in pnpm-workspace.yaml or the .npmrc also turns proxying off. On the command line, false and null are ordinary host names, since a flag carries its value verbatim.
httpProxy
- Default: null
- Type: url
A proxy to use for outgoing HTTP requests. If the HTTP_PROXY or http_proxy
environment variables are set, proxy settings will be honored by the underlying
request library.
Empty, false, and null values behave as described for httpsProxy.
The .npmrc also supports npm's legacy proxy setting, which is used as the fallback for both https-proxy and http-proxy. Since v11.20.0, an empty proxy= reads as unset and therefore no longer suppresses the HTTPS_PROXY environment variable, and proxy=false (or proxy: false in pnpm-workspace.yaml) turns proxying off instead of being read as a proxy host named false (#13533).
noProxy
- Default: null
- Type: String
Una stringa di estensioni di dominio separate da virgole per le quali non dovrebbe essere utilizzato un proxy.
Empty, false, and null values behave as described for httpsProxy.
localAddress
- Default: undefined
- Type: IP Address
L'indirizzo IP dell'interfaccia locale da utilizzare quando si effettuano connessioni al registro npm.
maxsockets
- Default: networkConcurrency x 3
- Type: Number
Il numero massimo di connessioni da utilizzare per origine (combinazione protocollo/host/porta).
strictSsl
- Default: true
- Type: Boolean
Se eseguire o meno la convalida della chiave SSL quando si effettuano richieste al registro tramite HTTPS.
Impostazioni richiesta
gitShallowHosts
- Default: ['github.com', 'gist.github.com', 'gitlab.com', 'bitbucket.com', 'bitbucket.org']
- Type: string[]
Durante il recupero delle dipendenze che sono repository Git, se l'host è elencato in questa impostazione, pnpm utilizzerà la clonazione superficiale per recuperare solo il commit necessario, non tutta la cronologia.
networkConcurrency
- Default: auto (workers × 3 clamped to 16-64)
- Type: Number
Controlla il numero massimo di richieste HTTP(S) da elaborare contemporaneamente.
As of v10.24.0, pnpm automatically selects a value between 16 and 64 based on the number of workers (networkConcurrency = clamp(workers × 3, 16, 64)). Set this value explicitly to override the automatic scaling.
fetchRetries
- Default: 2
- Type: Number
Quante volte riprovare se pnpm non riesce a recuperare dal registro.
fetchRetryFactor
- Default: 10
- Type: Number
Il fattore esponenziale per i tentativi di backoff.
fetchRetryMintimeout
- Default: 10000 (10 seconds)
- Type: Number
The lower bound (in milliseconds) of the retry exponential backoff.
fetchRetryMaxtimeout
- Default: 60000 (1 minute)
- Type: Number
The upper bound (in milliseconds) of the retry exponential backoff.
fetchTimeout
- Default: 60000 (1 minute)
- Type: Number
The maximum amount of time to wait for HTTP requests to connect and complete. This time should be enough to download the largest package over a reasonable connection.
fetchWarnTimeoutMs
Added in: v10.18.0
- Default: 10000 ms (10 seconds)
- Type: Number
A warning message is displayed if a metadata request to the registry takes longer than the specified threshold (in milliseconds).
fetchMinSpeedKiBps
Added in: v10.18.0
- Default: 50 KiB/s
- Type: Number
A warning message is displayed if the download speed of a tarball from the registry falls below the specified threshold (in KiB/s).