npm install multiple package names

Lukáš Řádek picture Lukáš Řádek · Aug 7, 2016 · Viewed 58.6k times · Source

What does it do when I run this command:

npm install --save-dev package1 package2

It is definitely not installing multiple packages, but it looks to be essential. (For example https://www.browsersync.io/docs/gulp)

For me it throws following ERRs:

Answer

Carlos Perez picture Carlos Perez · Jul 30, 2017

Save as dependencies:

npm i package1 package2

Save as dev-dependencies:

npm i -D package1 package2

npm i --save-dev package1 package2