npm ERR! Missing script: start

Asked

Viewed 14,539 times

1

I have this error when trying to start Vue-cli. The installation ran smoothly:

villas:vue villas$ npm start
npm ERR! missing script: start

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/villas/.npm/_logs/2017-08-25T00_39_17_837Z-debug.log

And there in the log file:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose stack Error: missing script: start
4 verbose stack     at run (/usr/local/lib/node_modules/npm/lib/run-script.js:151:19)
4 verbose stack     at /usr/local/lib/node_modules/npm/lib/run-script.js:61:5
4 verbose stack     at /usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:114:5
4 verbose stack     at /usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:401:5
4 verbose stack     at checkBinReferences_ (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:356:45)
4 verbose stack     at final (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:399:3)
4 verbose stack     at then (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:159:5)
4 verbose stack     at ReadFileContext.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:331:20)
4 verbose stack     at ReadFileContext.callback (/usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:78:16)
4 verbose stack     at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:366:13)
5 verbose cwd /Users/villas/Sites/vue
6 verbose Darwin 16.7.0
7 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
8 verbose node v6.11.2
9 verbose npm  v5.3.0
10 error missing script: start
11 verbose exit [ 1, true ]
  • 1

    you gave Vue init?

  • Just Vue list or Vue init that gives the error.

1 answer

1


npm ERR! Missing script: start

This error occurs you did not set in the file package.json the script start, example:

  "scripts": {
    // Adicione essa linha, mas pode ser também ex = "start: "node index.js"
    "start": "vue init",
    "test": "echo "Error: no test specified" && exit 1"
  },

I recommend reading of package.json understanding the scripts article written by: William Brune

  • Only I will read yes.

  • If the answer has clarified the problem, please consider branding it as útil

Browser other questions tagged

You are not signed in. Login or sign up in order to post.