Install and add a npm module to the project

  • by

In your Node.js project, there is a package.json file, which includes all the npm modules, your project depends on. To automatically add a npm module on install to this file, you have to enter the following command.

npm i bcrypt --save

The key is “–save”. Through that parameter, bcrypt will automatically be added to your package.json file.

If there are modules, which are only used for development, these can be installed and declared as development dependencies.

npm i nodemon --save-dave
Tags: