メインコンテンツまでスキップ
Version: 11 & 12

Network & Request Settings

Network Settings

httpsProxy

  • Default: null
  • Type: url

送信する HTTPS リクエストに使用するプロキシ。 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. 例:

httpsProxy: "https://use%21r:pas%2As@my.proxy:1234/foo"

Do not encode the colon (:) between the username and password.

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.

noProxy

  • Default: null
  • Type: String

プロキシーを使わない TLD をコンマ区切りの文字列で指定します。

localAddress

  • Default: undefined
  • Type: IP Address

npm レジストリへの接続を行うときに使用するローカルインターフェイスのIPアドレス。

maxsockets

  • Default: networkConcurrency x 3
  • Type: Number

origin (protocol/host/port の組み合わせ) ごとに使用する最大接続数です。

strictSsl

  • Default: true
  • Type: Boolean

HTTPS 経由でレジストリにリクエストを送る際にSSL鍵の検証を行うかどうかを指定します。

リクエスト設定

gitShallowHosts

  • Default: ['github.com', 'gist.github.com', 'gitlab.com', 'bitbucket.com', 'bitbucket.org']
  • Type: string[]

Git リポジトリである依存関係を取得する際、この設定でホストがリストアップされている場合、pnpm は浅いクローン(シャロークローン) を用いて、すべての履歴ではなく、必要なコミットのみを取得するようにします。

networkConcurrency

  • Default: auto (workers × 3 clamped to 16-64)
  • Type: Number

同時に処理する HTTP(S) のリクエストの最大数を制御します。

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

pnpm がレジストリからの取得に失敗した際に何回リトライするかを指定する。

fetchRetryFactor

  • Default: 10
  • Type: Number

再試行間隔の指数関数バックオフ (Exponential 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).