這是我第一次嘗試學習反應,它開始非常糟糕。我已經完成了「創建新應用」選項卡上的指示:https://facebook.github.io/react/docs/installation.html。沒有做任何不同的事情。reactjs npm start ELIFECYCLE錯誤
我使用節點8.1.3和5.0.4 NPM
(我也嘗試降級節點至6.11沒有成功)。
我在安裝過程中根本沒有任何錯誤。
當我運行npm start
,我得到這個超級無益的錯誤:
Starting the development server...
events.js:182
throw er; // Unhandled 'error' event
^
Error: watch /var/phil-machine/Code/react/test1/public ENOSPC
at exports._errnoException (util.js:1022:11)
at FSWatcher.start (fs.js:1384:19)
at Object.fs.watch (fs.js:1410:11)
at createFsWatchInstance (/var/phil-machine/Code/react/test1/node_modules/chokidar/lib/nodefs-handler.js:37:15)
at setFsWatchListener (/var/phil-machine/Code/react/test1/node_modules/chokidar/lib/nodefs-handler.js:80:15)
at FSWatcher.NodeFsHandler._watchWithNodeFs (/var/phil-machine/Code/react/test1/node_modules/chokidar/lib/nodefs-handler.js:228:14)
at FSWatcher.NodeFsHandler._handleDir (/var/phil-machine/Code/react/test1/node_modules/chokidar/lib/nodefs-handler.js:407:19)
at FSWatcher.<anonymous> (/var/phil-machine/Code/react/test1/node_modules/chokidar/lib/nodefs-handler.js:455:19)
at FSWatcher.<anonymous> (/var/phil-machine/Code/react/test1/node_modules/chokidar/lib/nodefs-handler.js:460:16)
at FSReqWrap.oncomplete (fs.js:153:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/phil/.npm/_logs/2017-07-05T23_52_25_652Z-debug.log
我不知所措。我GOOGLE了它(盡我所能 - 我甚至不知道什麼谷歌除了通用的「反應開始錯誤」),並得到了這個答案https://stackoverflow.com/a/39960890/1569591但這也沒有幫助。
當我運行npm start
它帶來了上述錯誤,並打開「Site can not be reached」錯誤的bowser。
任何人都可以幫助指出我如何解決這個問題嗎?
我也試圖改變啓動命令來使用不同的端口:
PORT=3001 react-scripts start
也不能工作。
/tmp只有2.7MB大:( –
我有同樣的不可理解的錯誤,這個答案讓我走上正軌,問題已經用3個命令行解決了:'sudo apt-get autoremove','sudo rm -rf/tmp/*'然後'sudo reboot'。現在一切都適合我! – mrroboaat