问题:在运行choerodon-front的时候,报错误,之后就运行前端demo程序,结果也是在npm run start的时候报error,package.json不一致,是我创建的时候有问题,还是我的环境有问题呢??
看一下那个log文件
0 info it worked if it ends with ok
1 verbose cli [ ‘D:\node.exe’,
1 verbose cli ‘D:\node_modules\npm\bin\npm-cli.js’,
1 verbose cli ‘run’,
1 verbose cli ‘start’ ]
2 info using npm@6.9.0
3 info using node@v10.16.3
4 verbose stack Error: missing script: start
4 verbose stack at run (D:\node_modules\npm\lib\run-script.js:155:19)
4 verbose stack at D:\node_modules\npm\lib\run-script.js:63:5
4 verbose stack at D:\node_modules\npm\node_modules\read-package-json\read-json.js:115:5
4 verbose stack at D:\node_modules\npm\node_modules\read-package-json\read-json.js:418:5
4 verbose stack at checkBinReferences_ (D:\node_modules\npm\node_modules\read-package-json\read-json.js:373:45)
4 verbose stack at final (D:\node_modules\npm\node_modules\read-package-json\read-json.js:416:3)
4 verbose stack at then (D:\node_modules\npm\node_modules\read-package-json\read-json.js:160:5)
4 verbose stack at ReadFileContext. (D:\node_modules\npm\node_modules\read-package-json\read-json.js:332:20)
4 verbose stack at ReadFileContext.callback (D:\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:90:16)
4 verbose stack at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:237:13)
5 verbose cwd D:\BaiduNetdiskDownload\qianduan\choerodon-todo-service
6 verbose Windows_NT 10.0.17134
7 verbose argv “D:\node.exe” “D:\node_modules\npm\bin\npm-cli.js” “run” “start”
8 verbose node v10.16.3
9 verbose npm v6.9.0
10 error missing script: start
11 verbose exit [ 1, true ]
package.json里是不是没有start命令
你好,在哪个位置添加start命令呢
参照https://github.com/choerodon/choerodon-front/blob/master/package.json
还是报错啊,你的前端项目可以正常启动起来吗?
看一下那个config.js文件路径对不对