Skip to content

feat(docs): recommend users to use a lock file and npm ci when running in CI #2208

@erezrokah

Description

@erezrokah

Is your feature request related to a problem? Please describe.

Related to #2202

When users run npm install netlify-cli -g they always get the latest minor/patch versions of CLI dependencies. This usually works ok and helps users get the latest security updates, but can cause issues when packages don't follow semver.

When running in CI it is recommended to use a lock file and npm ci or yarn install --frozen-lockfile to ensure reproducible builds.

Important npm install netlify-cli -g also means users opt in to any CLI major (breaking) version change. Those are less frequent but still happen.

Describe the solution you'd like

Update the docs to recommend using a lock file when using the CLI in CI environments

Describe alternatives you've considered

#2223
#1597

Can you submit a pull request?

Yes

Metadata

Metadata

Assignees

Labels

action_itemaction item for an incidentneeds docstype: featurecode contributing to the implementation of a feature and/or user facing functionality

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions