Skip to content

What's the correct way to handle packages version #7675

Answered by snowystinger
ndozhh asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, thanks for the discussion.

NPM (and other package managers) can try to be a little too smart when it comes to frontend, and it will frequently try to install multiple copies of packages so as to introduce the fewest code path changes possible. This is great for servers, however, for client code, it's usually unwanted.

You may need to use tools like dedupe or resolutions in order to get back to a single copy of a given package. Another option, you could delete just the entries in your lock file, but make sure you delete node_modules as when the reinstall takes place, if you have any node_modules locally, it will try to use those to resolve so it installs faster. You can also delete nod…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ndozhh
Comment options

Answer selected by ndozhh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants