Install npm in a subfolder

How can I run npm install in a subfolder via the command line (single command) if the pointer is in the main folder and should remain there?

 main_folder <- pointer is here - node_modules - package.json sub_folder <- npm install here - node_modules - package.json 
+5
source share
1 answer

With the prefix argument, you can specify the installation location:

 npm install --prefix <sub_folder> <module_to_install> 
+8
source

Source: https://habr.com/ru/post/1246575/


All Articles