pnpm install
Aliases: i
pnpm install
is used to install all dependencies for a project.
CI 環境では、ロックファイルが存在しても更新が必要な場合はインストールは失敗します。
Inside a workspace, pnpm install
installs all dependencies in all the
projects. If you want to disable this behavior, set the recursive-install
setting to false
.
TL;DR
コマンド | 意味 |
---|---|
pnpm i --offline | ストアからのみオフラインでインストールする |
pnpm i --frozen-lockfile | pnpm-lock.yaml is not updated |
pnpm i --lockfile-only | Only pnpm-lock.yaml is updated |
Options
--force
依存関係の強制再インストール: ストアで変更されたパッケージを再取得し、互換性のないバージョンの pnpm で作成されたロックファイルやモジュールディレクトリを再作成します。 Install all optionalDependencies even they don't satisfy the current environment(cpu, os, arch).
--offline
- Default: false
- Type: Boolean
If true
, pnpm will use only packages already available in the store.
依存パッケージがローカルで見つからない場合、インストールは失敗します。
--prefer-offline
- Default: false
- Type: Boolean
If true
, staleness checks for cached data will be bypassed, but missing data
will be requested from the server. To force full offline mode, use --offline
.