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

[QUESTION] How to compare npm install vs npm ci #1241

Closed
jamime opened this issue May 4, 2020 · 2 comments
Closed

[QUESTION] How to compare npm install vs npm ci #1241

jamime opened this issue May 4, 2020 · 2 comments
Labels
Awaiting Information further information is requested

Comments

@jamime
Copy link

jamime commented May 4, 2020

What / Why

When I run npm ci my tests pass.
When I run npm install my tests fail.

I used npm list but they produced an almost identical list, it doesn't install a few dependencies that are resolved from github. These dependencies are not the cause of my failing test.

How can I work out the difference between the two installation algorithms?

Where

Who

  • n/a

References

  • n/a
@76784
Copy link

76784 commented May 7, 2020

ci and install are two different commands that do two different things.

They both install dependencies. But install will install from package.json, and if the caret is present (^) it will install the latest version of the major version listed.

ci was introduced later to solve the problems that the above can cause (different installations installing slightly different versions of a package). ci installs exactly what is listed in package-lock.json. In fact, it won't work if package-lock is not present.

install installs and writes to package-lock, or creates package-lock it if it is not present. ci does not write to anything - it just reads and installs.

See https://docs.npmjs.com/cli/ci

@darcyclarke darcyclarke added the Awaiting Information further information is requested label Oct 30, 2020
@darcyclarke
Copy link
Contributor

npm v6 is no longer in active development; We will continue to push security releases to v6 at our team's discretion as-per our Support Policy.

If your bug is reproducible on v7, please re-file this issue using our new issue template.

If your issue was a feature request, please consider opening a new RRFC or RFC. If your issue was a question or other idea that was not CLI-specific, consider opening a discussion on our feedback repo

Closing: This is an automated message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Information further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants