Using npm, how can you install multiple modules at once locally?
Experience Level: Junior
Tags: npm
Answer
To install one, two or more modules locally, open the command-line, change your current directory to the directory that contains your project with file package.json and run the following command:
npm install <module1> <module2> <module3>
To install one, two or more modules globally, open the command-line, change your current directory to the directory that contains your project with file package.json and run the following command:
npm install -g <module1> <module2> <module3>
Related npm job interview questions
How do you install npm?
npm JuniorHow do you update npm packages to new versions?
npm JuniorUsing npm, how can you display a list of all installed global packages?
npm JuniorWhat does npm audit fix command do and when would you use it?
npm JuniorUsing npm, how do you list installed modules?
npm Junior