How can I install the development dependencies of a package into the root of my project?

(Sam Weaver) #1

My folder structure looks like this:


I run recursive installs in my package prepublish hook (so it runs right after installs) to install the dependencies within the another_package folder, but I need to also install all the packages from another_package/package.json into the root node_modules folder.

I can run npm install another_package and it’ll install the dependencies into the main node_modules folder, but it won’t install the development dependencies which I also need. I’ve tried using the --only=dev and the --dev flags, and they don’t have an effect.

Any ideas?

(system) #2

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.