Home > Back-end >  What is the difference between the following npm install statements?
What is the difference between the following npm install statements?

Time:11-16

npm install @uiw/react-monacoeditor --save

VS

npm i @uiw/react-monacoeditor

What is the difference between following npm install statements when to use --save flag?

CodePudding user response:

Currently they will not differ at all. Since NPM 5 packages are automatically saved into package.json dependencies when installed.

npm I is the short version of npm install so that part of the command does not differ at all either.

You can read more about the install command here: https://docs.npmjs.com/cli/v8/commands/npm-install

And there is does say “ npm install saves any specified packages into dependencies by default.”

  • Related