Saturday 23 January 2016

Why is my module installing devDependencies when used via `npm install`?

I just published a module, pg.promised. It only has one dependency, but multiple devDependencies. I created a new project to make sure it was working.mkdir mtest ; cd mtest npm install pg.promised it was put into node_modules but inside /node_modules/pg.promised, there was another node_modules directory with all of dependencies, dev and regular, were in there. I'm using npm v3.5.3. Is this how it's supposed to work? I thought the tree should be much flatter and the devDeps shouldn't be installed when npm install pg.promised is run.

Submitted January 24, 2016 at 02:06AM by sdellysse

No comments:

Post a Comment