The npm community forum has been discontinued.
To discuss usage of npm, visit the GitHub Support Community.
How can I install the development dependencies of a package into the root of my project?
My folder structure looks like this:
./ ./package.json ./node_modules ./another_package ./another_package/package.json ./another_package/node_modules
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
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.