亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

錯誤的ERR!代碼ELIFECYCLE

錯誤的ERR!代碼ELIFECYCLE

寶慕林4294392 2019-08-31 14:40:35
我正在嘗試學習反應,所以我有這個示例代碼為fullstack反應投票應用程序,我試圖讓它工作,但在運行npm install后跟npm start我收到以下錯誤:npm ERR! Darwin 16.4.0npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "server"npm ERR! node v7.5.0npm ERR! npm  v4.3.0npm ERR! file shnpm ERR! code ELIFECYCLEnpm ERR! errno ENOENTnpm ERR! syscall spawnnpm ERR! [email protected] server: `live-server --public --    host=localhost --port=3000 --middleware=./disable-browser-cache.js`npm ERR! spawn ENOENTnpm ERR!npm ERR! Failed at the [email protected] server script 'live-server --public --host=localhost --port=3000 --middleware=./disable-browser- cache.js'.npm ERR! Make sure you have the latest version of node.js and npm  installed.npm ERR! If you do, this is most likely a problem with the voting_app  package,npm ERR! not with npm itself.npm ERR! Tell the author that this fails on your system:npm ERR!     live-server --public --host=localhost --port=3000 --  middleware=./disable-browser-cache.jsnpm ERR! You can get information on how to open an issue for this  project with:npm ERR!     npm bugs voting_appnpm ERR! Or if that isn't available, you can get their info via:npm ERR!     npm owner ls voting_appnpm ERR! There is likely additional logging output above.npm ERR! Please include the following file with any support request:npm ERR!     /Users/ItsMeMrLi/.npm/_logs/2017-02-17T22_48_03_581Z-debug.lognpm ERR! Darwin 16.4.0npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"npm ERR! node v7.5.0npm ERR! npm  v4.3.0npm ERR! code ELIFECYCLEnpm ERR! errno 1npm ERR! [email protected] start: `npm run server`npm ERR! Exit status 1npm ERR!npm ERR! Failed at the [email protected] start script 'npm run server'.npm ERR! Make sure you have the latest version of node.js and npm installed.npm ERR! If you do, this is most likely a problem with the voting_app    package,npm ERR! not with npm itself.npm ERR! Tell the author that this fails on your system:npm ERR!     npm run server
查看完整描述

3 回答

?
偶然的你

TA貢獻1841條經驗 獲得超3個贊

步驟1: $ npm cache clean --force

步驟2:按文件夾刪除node_modules$ rm -rf node_modules或通過進入目錄手動刪除它,然后右鍵單擊>刪除。也刪除package-lock.json文件。

第3步: npm install

重新開始 $ npm start

這對我有用。希望它也適合你。

PS:如果它在那里,請檢查它以紅色顯示的錯誤并采取相應措施。此錯誤特定于node.js環境??鞓肪幋a!!


查看完整回答
反對 回復 2019-08-31
?
慕田峪7331174

TA貢獻1828條經驗 獲得超13個贊

清潔CacheNode_module不夠。請遵循以下步驟:

  • npm cache clean --force

  • 刪除node_modules文件夾

  • 刪除package-lock.json文件

  • npm install

它對我有用。


查看完整回答
反對 回復 2019-08-31
?
慕桂英3389331

TA貢獻2036條經驗 獲得超8個贊

我先跑了:


npm run clean

(即使它有錯誤)


然后我刪除了node_modules文件夾并運行


npm install

這似乎解決了這個問題。


查看完整回答
反對 回復 2019-08-31
  • 3 回答
  • 0 關注
  • 1563 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號