-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
[BUG] <pnpm did it - why not npm as well? > #7234
Comments
Regardless of your CLI tool, you shouldn't be installing deps at deploy time - you should be deploying a fully installed application. |
@ljharb Definitely! But you cherrypicked one false expression "important to deploy fast" to dodge the key question. Why can the most used & default nodejs package manager that is developed since 2010 not compete with a small community that started developing js package managers in 2016? If there were promising plans, to improve npm, I wouldnt say one word, but it feels like nothing happens and criticism is not taken serious. |
I'm not sure what you mean by "not compete". Speed is one metric, but correctness is a much more important one - and npm has improved a lot over every year in the past 10, so again, I'm not sure what you're referring to. |
I think I should point out that in a CI/CD pipeline, "deploy time" and "build time" are essentially the same. Either way, the install (node_modules) should definitely NOT come from a developer machine, it should come from a build agent, and more often than not these days, build agents are containers. So just replace "deploy fast" with "build fast" if you like, but what OP said makes perfect sense either way. One detail I might nitpick on is that performance should always be compared with the lock file in tact - I just don't see a legitimate use case where you would need a fast build without one. Node_modules, on the other hand, should be deleted. |
This does not appear to be an actual bug report, but more of a general complaint. If you have an actionable way to speed npm up please let us know. |
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
Expected Behavior
Steps To Reproduce
=> You'll recognize that pnpm is ~4x faster.
=> Without deleting node_modules & package-lock, npm & pnpm offer similar performance, but as we are in 2024 and everything uses pods & containers, it's more important than ever to deploy fast.
Environment
The text was updated successfully, but these errors were encountered: