Node Js Adding Unwanted Modules When I Do Npm Install
I am trying to spin up a node service on my mac. When I run npm install in the folder where my node service is, it is installing modules which are not mentioned in my package.json.
Solution 1:
Well, it has been introduced with npm3 (https://github.com/npm/npm/blob/master/CHANGELOG.md#v300-2015-06-25):
Flat, flat, flat!
Your dependencies will now be installed maximally flat. Insofar as is possible, all of your dependencies, and their dependencies, and THEIR dependencies will be installed in your project's node_modules folder with no nesting. You'll only see modules nested underneath one another when two (or more) modules have conflicting dependencies.
Solution 2:
I believe this is something new that happened in the newest version of npm
.
If I'm not mistaken, it's installing all the dependencies flat
instead of nested inside of whichever module that needs it.
Post a Comment for "Node Js Adding Unwanted Modules When I Do Npm Install"