npm ERR! missing script: code example

Example 1: npm ERR! missing script: start

"scripts": {
   "start": "node app.js"
},

Example 2: npm verbose stack error

{
  "name": "package-name",
  "version": "1.0.0",
  "description": "package description",
  "scripts": {
    "start": "node lib/server.js",
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "dependencies": {},
  "devDependencies": {}
}

Example 3: npm ERR! missing script: build:dev

{
  "name": "testapp",
  "version": "1.0.0",
  "description": "",
  "scripts": {
    "dev": "echo This is the DEV script",
    "abc": "echo This is the abc script",
    "xyz": "echo This is the xyz script",
    "start":"echo This is the special start script"
  }
}

Tags:

Misc Example