Home > Net >  Add npm install script in package.json file?
Add npm install script in package.json file?

Time:01-01

"scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start",
    "install": "npm install"         //Creates a loop and tries to run `npm install` continuously.
  },

I would like to have this script so that I can just just click on the icon/option in my IDE as shown below instead of executing npm install in the terminal to install packages.

enter image description here

CodePudding user response:

Rename the install script to something else, like setup.

  • Related