npm save as dev dependency
# add --save-dev to the npm i/install command. Example:
npm i nodemon --save-dev
npm save as dev dependency
# add --save-dev to the npm i/install command. Example:
npm i nodemon --save-dev
what is difference between npm install and npm install save --dev
npm install saves any specified packages into dependencies by default. Additionally, you can control where and how they get saved with some additional flags:
-P, --save-prod: Package will appear in your dependencies. This is the default unless -D or -O are present.
-D, --save-dev: Package will appear in your devDependencies.
-O, --save-optional: Package will appear in your optionalDependencies.
--no-save: Prevents saving to dependencies.
tl;dr: the default form of npm install if nothing else is specified is to --save it.
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us