Reputation: 8045
How can I run npm install
in subfolder via command line (single command) if pointer in the main folder and must remain there?
main_folder <- pointer is here
- node_modules
- package.json
sub_folder <- npm install here
- node_modules
- package.json
Upvotes: 13
Views: 10547
Reputation: 2451
With the prefix
argument you can specify an installation location:
npm install --prefix <sub_folder> <module_to_install>
Upvotes: 20