Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: use npm ci for deployment, not npm install #694

Merged
merged 1 commit into from
Jun 5, 2024

Conversation

EvanHahn
Copy link
Contributor

@EvanHahn EvanHahn commented Jun 5, 2024

npm ci is slightly better for deployments than npm install.

  • It ensures all installed packages match package-lock.json.
  • It automatically removes node_modules/ if it exists, ensuring a clean slate.
  • It won't update package.json or package-lock.json.

Not a huge difference, but recommended for deployments.

[`npm ci`][0] is slightly better for deployments than `npm install`.

- It ensures all installed packages match `package-lock.json`.
- It automatically removes `node_modules/` if it exists, ensuring a
  clean slate.
- It won't update `package.json` or `package-lock.json`.

Not a huge difference, but recommended for deployments.

[0]: https://docs.npmjs.com/cli/v10/commands/npm-ci
Copy link
Contributor

@tomasciccola tomasciccola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

weird that this slipped us!

@EvanHahn EvanHahn merged commit 56fa2b7 into main Jun 5, 2024
7 checks passed
@EvanHahn EvanHahn deleted the npm-ci-for-deploy branch June 5, 2024 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants