versioned_docs_archived/version-5.x/cli/install.md
Aliases: i
pnpm install is used to install all dependencies for a project.
In a CI environment, installation fails if a lockfile is present but needs an update.
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.
| Command | Meaning |
|---|---|
pnpm i --offline | Install offline from the store only |
pnpm i --frozen-lockfile | pnpm-lock.yaml is not updated |
pnpm i --lockfile-only | Only pnpm-lock.yaml is updated |
If true, pnpm will use only packages already available in the store. If a package won't be found locally, the installation will fail.
Added in: v1.28.0
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.
Do not execute any scripts defined in the project package.json and its
dependencies.
:::note
This flag does not prevent the execution of pnpmfile.js
:::
pnpm will not install any package listed in devDependencies if the NODE_ENV
environment variable is set to production. Use this flag to instruct pnpm to
ignore NODE_ENV and take its production status from this flag instead.
Only devDependencies are installed regardless of the NODE_ENV.
optionalDependencies are not installed.
Added in: v1.26.0 (initially named shrinkwrap-only)
When used, only updates pnpm-lock.yaml and package.json instead of checking
node_modules and downloading dependencies.
Added in: v1.37.1 (initially named frozen-shrinkwrap)
If true, pnpm doesn't generate a lockfile and fails to install if the lockfile
is out of sync with the manifest / an update is needed or no lockfile is
present.
Allows you to choose the reporter that will log debug info to the terminal about the installation progress.
Added in: v1.30.0
Starts a store server in the background. The store server will keep running
after installation is done. To stop the store server, run pnpm server stop
Creates a flat node_modules structure, similar to that of npm or yarn.
WARNING: This is highly discouraged.