Description
Perform a clean install. This command runs pnpm clean followed by pnpm install --frozen-lockfile.
Designed for CI/CD environments where reproducible builds are critical.
https://pnpm.io/11.x/cli/ci
The main differences between using npm install and npm ci are:
- The project must have an existing
package-lock.json or npm-shrinkwrap.json.
- If dependencies in the package lock do not match those in
package.json, npm ci will exit with an error, instead of updating the package lock.
npm ci can only install entire projects at a time: individual dependencies cannot be added with this command.
- If a
node_modules is already present, it will be automatically removed before npm ci begins its install.
- It will never write to
package.json or any of the package-locks: installs are essentially frozen.
https://docs.npmjs.com/cli/v11/commands/npm-ci
Suggested solution
Add ci subcommand like:
Alternative
Run rm -rf node_modules && vp install --frozen-lockfile manually.
Additional context
Validations
Description
https://pnpm.io/11.x/cli/ci
https://docs.npmjs.com/cli/v11/commands/npm-ci
Suggested solution
Add
cisubcommand like:npm ci: https://docs.npmjs.com/cli/v11/commands/npm-cipnpm ci: https://pnpm.io/11.x/cli/ci (Added in v11)Alternative
Run
rm -rf node_modules && vp install --frozen-lockfilemanually.Additional context
npm ci: https://docs.npmjs.com/cli/v11/commands/npm-cipnpm ci: https://pnpm.io/11.x/cli/ciValidations