1、错误描述
0 info it worked if it ends with ok
1 verbose cli [ 'F:\nodejs\node.exe',
1 verbose cli 'F:\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'webpack' ]
2 info using npm@6.2.0
3 info using node@v10.8.0
4 verbose stack Error: missing script: webpack
4 verbose stack at run (F:
odejs
ode_modules
pmlib
un-script.js:155:19)
4 verbose stack at F:
odejs
ode_modules
pmlib
un-script.js:63:5
4 verbose stack at F:
odejs
ode_modules
pm
ode_modules
ead-package-json
ead-json.js:115:5
4 verbose stack at F:
odejs
ode_modules
pm
ode_modules
ead-package-json
ead-json.js:418:5
4 verbose stack at checkBinReferences_ (F:
odejs
ode_modules
pm
ode_modules
ead-package-json
ead-json.js:373:45)
4 verbose stack at final (F:
odejs
ode_modules
pm
ode_modules
ead-package-json
ead-json.js:416:3)
4 verbose stack at then (F:
odejs
ode_modules
pm
ode_modules
ead-package-json
ead-json.js:160:5)
4 verbose stack at F:
odejs
ode_modules
pm
ode_modules
ead-package-json
ead-json.js:280:12
4 verbose stack at F:
odejs
ode_modules
pm
ode_modulesgraceful-fsgraceful-fs.js:78:16
4 verbose stack at FSReqWrap.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:53:3)
5 verbose cwd F:WebstormProjectseuwesa
6 verbose Windows_NT 6.1.7601
7 verbose argv "F:\nodejs\node.exe" "F:\nodejs\node_modules\npm\bin\npm-cli.js" "run" "webpack"
8 verbose node v10.8.0
9 verbose npm v6.2.0
10 error missing script: webpack
11 verbose exit [ 1, true ]
2、错误原因
使用命令npm run webpack运行webpack
F:WebstormProjectseuwesa>npm run webpack
npm ERR! missing script: webpack
npm ERR! A complete log of this run can be found in:
npm ERR! F:
odejs
ode_cache\_logs2018-10-15T03_02_03_095Z-debug.log
在vue.js项目中,无法找到webpack.cmd文件
3、解决办法
(1)检查下载安装包是否存在webpack
(2)如果没有,需要重新下载