0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'C:\\ProgramFiles\\nodejs\\node.exe',
1 verbose cli 'C:\\ProgramFiles\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'build'
1 verbose cli ]
2 info using npm@6.14.4
3 info using node@v12.17.0
4 verbose stack Error: missing script: build
4 verbose stack at run (C:\ProgramFiles\nodejs\node_modules\npm\lib\run-script.js:155:19)
4 verbose stack at C:\ProgramFiles\nodejs\node_modules\npm\lib\run-script.js:63:5
4 verbose stack at C:\ProgramFiles\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:116:5
4 verbose stack at C:\ProgramFiles\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:436:5
4 verbose stack at checkBinReferences_ (C:\ProgramFiles\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:391:45)
4 verbose stack at final (C:\ProgramFiles\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:434:3)
4 verbose stack at then (C:\ProgramFiles\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:161:5)
4 verbose stack at C:\ProgramFiles\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:281:12
4 verbose stack at C:\ProgramFiles\nodejs\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:115:16
4 verbose stack at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:63:3)
5 verbose cwd D:\code\vue\vue-simple-master\vue-simple-master
6 verbose Windows_NT 10.0.18363
7 verbose argv "C:\\ProgramFiles\\nodejs\\node.exe" "C:\\ProgramFiles\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
8 verbose node v12.17.0
9 verbose npm v6.14.4
10 error missing script: build
11 verbose exit [ 1, true ]
解决方法
首先试了
以上没有解决,用以下方法
原因是package.json的scripts中:"build:prod"