It appears that when I run npm link
, it will install the project globally, and it seems to install devDependencies with it.
Is there a way to run npm link without devDependencies, perhaps with the --only=production
flag?
In npm@4.x
or lower
When you run npm link
in other_module
then you will get both dependencies and devDependencies symlinked.
The --production
flag doesn't change anything, still creates a symlink to the whole directory
In npm@5.1.0
They fixed it!
If you remove node_modules
and then do npm link --only=production
, it runs an install before symlinking, and therefore devDependencies folder are indeed excluded.