npm run build 报错
打开日志显示内容:
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'D:\\chenxumulu\\node.js\\node.exe',
1 verbose cli 'C:\\Users\\57869\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'build'
1 verbose cli ]
2 info using npm@6.14.8
3 info using node@v12.18.3
4 verbose stack Error: missing script: build
4 verbose stack
4 verbose stack Did you mean this?
4 verbose stack build:
4 verbose stack at run (C:\Users\57869\AppData\Roaming\npm\node_modules\npm\lib\run-script.js:155:19)
4 verbose stack at C:\Users\57869\AppData\Roaming\npm\node_modules\npm\lib\run-script.js:63:5
4 verbose stack at C:\Users\57869\AppData\Roaming\npm\node_modules\npm\node_modules\read-package-json\read-json.js:116:5
4 verbose stack at C:\Users\57869\AppData\Roaming\npm\node_modules\npm\node_modules\read-package-json\read-json.js:436:5
4 verbose stack at checkBinReferences_ (C:\Users\57869\AppData\Roaming\npm\node_modules\npm\node_modules\read-package-json\read-json.js:391:45)
4 verbose stack at final (C:\Users\57869\AppData\Roaming\npm\node_modules\npm\node_modules\read-package-json\read-json.js:434:3)
4 verbose stack at then (C:\Users\57869\AppData\Roaming\npm\node_modules\npm\node_modules\read-package-json\read-json.js:161:5)
4 verbose stack at ReadFileContext.<anonymous> (C:\Users\57869\AppData\Roaming\npm\node_modules\npm\node_modules\read-package-json\read-json.js:350:20)
4 verbose stack at ReadFileContext.callback (C:\Users\57869\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:123:16)
4 verbose stack at FSReqCallback.readFileAfterOpen [as oncomplete] (fs.js:261:13)
5 verbose cwd C:\Users\57869\Desktop\lxdm\demo1
6 verbose Windows_NT 10.0.18363
7 verbose argv "D:\\chenxumulu\\node.js\\node.exe" "C:\\Users\\57869\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
8 verbose node v12.18.3
9 verbose npm v6.14.8
10 error missing script: build
10 error
10 error Did you mean this?
10 error build:
11 verbose exit [ 1, true ]
正在回答
同学你好,看另外一个问题中npm run build是可以编译的,应该是解决了吧。
报错提示信息是script中缺少了build,是不是忘记配置了呢?如果忘记了可以配置下
祝学习愉快!
- 参与学习 人
- 提交作业 239 份
- 解答问题 10739 个
本阶段带你深入前端开发的肌理,通过ES6基础知识和前端主流高级框架的学习,助你快速构建企业级移动webAPP应用,进入职场的终极battle
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星