I use npm workspaces. When I install a package for a workspace using nmp i somepackage -w workspace-a
it is placed in to the same directory with the workspace if the installed version is different from root version.
I want to move it to a sub dir of root node_modules dir. Is it possible?
current behaviour:
root
|--node_modules
| |--somepackage
|--workspace-a
| |--node_modules
| | |--somepackage
| |--package.json
|--package.json
what I want is something like:
root
|--node_modules
| |--somepackage
| |--workspace-a
| | |--node_modules
| | | |--somepackage
|--workspace-a
| |--package.json
|--package.json
npm install
to created anode_modules
folder at the workspace level, did you manage to solve it? – Phonologist