NPM save as dev dependency

Install as devDependency

npm install  --save-dev

Install as normal dependency

npm install  --save

Install all devDependencies listed in package.json

npm install --only=dev

Install all normal dependencies listed in package.json

npm install --only=prod

Or if NODE_ENV is set to production

npm install