3 ms·
For some reason, a few years ago somebody got the bright idea that installing globally was a good idea. It became a "best practice" even though you can really
by mikekchar 11y ago
For some reason, a few years ago somebody got the bright idea that installing globally was a good idea. It became a "best practice" even though you can really run into problems with dependencies of dependencies. It really is important never to install globally if you want to keep control of your dependencies. It's also very important to always delete .node_modules every time you update your package.json file -- especially when deploying. This is the only way you will be able to control what versions of things you have and to track down problems. I like working with Node, but for things like this it still suffers from some immaturity. "It works for me" syndrome is very common.
- mateuszf 11y ago+10 for these advices - another is to always lock the dependencies - either using precise static version numbers or npm-shrinkwrap.