1

I'm having trouble even explaining this one.

I want the desired behaviour as below for npm install (each package has a sub-folder)

enter image description here

But for some projects it seems to install all the dependencies like this.

enter image description here

2
  • What's the relevance of the structure of folder? The node or express manage this Commented Nov 11, 2015 at 11:54
  • I'm curious as to what makes the command npm install fetch and save the dependencies in folders as per the name of the package, as opposed to them all being in the one (node_modules) folder. Commented Nov 11, 2015 at 12:24

1 Answer 1

7

npm 3+ has a new feature where it tries to install modules and dependancies in as flat a structure as possible.

More information in v3.0.0 changelog.

Sign up to request clarification or add additional context in comments.

2 Comments

So is this what is described here? Do you have any other information about this feature?
Thanks for this. I had wondered if it was any error on my part.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.