Reputation: 51383
When I install locally is puts my modules two parents above my project folder. Why is this happening?
Thanks!
Upvotes: 1
Views: 195
Reputation: 259
NPM install will look back in the directory to find a node_modules directory, if one is not present.
If you're just prototyping or working through a tutorial, npm installing something locally and having it save to another node_modules file will actually still 'work' - but obviously this isn't ideal.
I think a better solution here is actually to use npm init
Documentation Here
This will set up a packages.json file which will track which versions and modules you are using for your node app and set up a node_modules file.
Upvotes: 0