node.js - 啟動(dòng)npm start 報(bào)錯(cuò) ,怎么辦
問(wèn)題描述
verbose pkgid doracms@1.1.116 verbose cwd /Users/myjianyue/Desktop/projectsSpace/express/DoraCMS17 error Darwin 16.4.018 error argv '/usr/local/bin/node' '/usr/local/bin/npm' 'start' 'app.js'19 error node v6.9.520 error npm v3.10.1021 error code ELIFECYCLE22 error doracms@1.1.1 start: node ./bin/www 'app.js'22 error Exit status 123 error Failed at the doracms@1.1.1 start script ’node ./bin/www 'app.js'’.23 error Make sure you have the latest version of node.js and npm installed.23 error If you do, this is most likely a problem with the doracms package,23 error not with npm itself.23 error Tell the author that this fails on your system:23 error node ./bin/www 'app.js'23 error You can get information on how to open an issue for this project with:23 error npm bugs doracms23 error Or if that isn’t available, you can get their info via:23 error npm owner ls doracms23 error There is likely additional logging output above.24 verbose exit [ 1, true ]
問(wèn)題解答
回答1:貼出npm官網(wǎng)對(duì)npm start的解釋(官網(wǎng)鏈接):
就是說(shuō):npm start 會(huì)默認(rèn)執(zhí)行package.json中scripts對(duì)象下'start'字段對(duì)應(yīng)的語(yǔ)句,如果scripts對(duì)象下沒(méi)有設(shè)置”start“字段的值,則npm會(huì)默認(rèn)執(zhí)行這條語(yǔ)句:
node server.js
請(qǐng)先檢查package.json中的配置,scripts下是否有start字段,如沒(méi)有,看是否有對(duì)應(yīng)的server.js文件。
回答2:Make sure you have the latest version of node.js and npm installed. If you do, this is most likely a problem with the doracms package,not with npm itself.Tell the author that this fails on your system:
這是上面的錯(cuò)誤提示
回答3:貼一下你的package.json的文件配置,
相關(guān)文章:
1. css3 - css before作為父級(jí)元素的背景色遮住了文字怎么辦?2. docker images顯示的鏡像過(guò)多,狗眼被亮瞎了,怎么辦?3. 視頻文件不能播放,怎么辦?4. java maven打包jar 方法參數(shù)名變var1,var2之類的無(wú)意義參數(shù)名怎么辦5. html5 - video ios不能播放怎么辦?6. ubuntu - 創(chuàng)建docker鏡像更新系統(tǒng)時(shí)出現(xiàn)Failed to fetch怎么辦?7. ruby - 執(zhí)行 rails server命令之后是這樣的,怎么辦?8. javascript - angular2 使用ng build --prod --aot打包之后,js還是很大,怎么辦?9. javascript - vscode alt+shift+f 格式化js代碼,通不過(guò)eslint的代碼風(fēng)格檢查怎么辦。。。10. node.js - axios 請(qǐng)求數(shù)據(jù),返回?cái)?shù)據(jù) data為空怎么辦
