3 ms·
In my experience, it's about the inconsistency between Node.js versions (each version could produce different package-lock.json). So, for example, you install
by revskill 5y ago
In my experience, it's about the inconsistency between Node.js versions (each version could produce different package-lock.json).
So, for example, you install the dependencies with Node 12, but have to run locally the system with Node 14.
So, i think just checkout the node_modules folder into git is not complete solution. You're avoiding the need to commit inconsistent package-lock.json, which is not hard to solve though.
- deanc 5y agoNobody should be running different versions in a team. Unless you’re selling a product where this is a likely scenario you should be running the same environment either through some kind of virtualization or at worst nvm.
- Tajnymag 5y agoIsn't that really a problem with npm and package maintainers? Node is really just a runtime.
- revskill 5y agoWhen you install nodejs, you have npm installed. So in this case, there's not much you can do though. So it's not just npm issue, it's NodeJS issue, too.
- Tajnymag 5y agoNot necessarily. On Arch, npm isn't bundled with the node package. Also, according to the official npm documentation, npm should be installed through nvm, thus having the ability to specify its version separately from node. https://docs.npmjs.com/downloading-and-installing-node-js-and-npm https://docs.npmjs.com/downloading-and-installing-node-js-an...