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
Documentation for "npm install" unclear or incorrect #840
Comments
I think it is not just the documentation, the I would expect the following behavior:
This is how Composer (PHP) works and there is no confusion around it. It is very simple and practical. |
@jkufner I also find the behaviour Btw. the reason why I opened this issue is: I was about to open an issue in a project using node.js, where I wanted to encourage use of |
My favorite response to this insanity comes from a comment on this SO question
Obviously a lock file should lock the dependencies installed with the |
When doing
npm help install
, the second sentence in the Description section is:I'm not sure what will be driven by that is supposed to mean. I would it interpret it this way:
If a package-lock or shrinkwrap file exists, npm installs the exact package versions described by that file. If not, it does package resolution according to the information in package.json.
That's however not what's happening.
npm install
will always install the latest version of the packages allowed bypackage.json
, overwritingpackage-lock.json
in the process. It's not clear to me what difference it makes for the install process if there's a package-lock file in place.Is this only me or should the documentation be changed to better reflect / explain actual behaviour?
The text was updated successfully, but these errors were encountered: