node.jsnpmpackage

How to run start scripts from package.json?


I've two scripts in package.json

"start:dev": "nodemon ./src/index.js",
"start": "npm run build && node ./build/index.js",

npm start works well. I need to run "start:dev": "nodemon ./src/index.js"


Solution

  • For most custom npm scripts you need to add run before script name npm run start:dev