实际上,我正在使用React js创建一个协作文本编辑器,当我尝试运行npm start命令时,我一次又一次遇到此错误:
throw er; // Unhandled 'error' event
^
Error: ENOSPC: no space left on device, watch '/home/lakshay/Desktop/edit/public'
at FSWatcher.start (fs.js:1409:26)
at Object.fs.watch (fs.js:1446:11)
at createFsWatchInstance (/home/lakshay/Desktop/edit/node_modules/webpack-dev-server/node_modules/chokidar/lib/nodefs-handler.js:37:15)
at setFsWatchListener (/home/lakshay/Desktop/edit/node_modules/webpack-dev-server/node_modules/chokidar/lib/nodefs-handler.js:80:15)
at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/lakshay/Desktop/edit/node_modules/webpack-dev-server/node_modules/chokidar/lib/nodefs-handler.js:228:14)
at FSWatcher.NodeFsHandler._handleDir (/home/lakshay/Desktop/edit/node_modules/webpack-dev-server/node_modules/chokidar/lib/nodefs-handler.js:407:19)
at FSWatcher.<anonymous> (/home/lakshay/Desktop/edit/node_modules/webpack-dev-server/node_modules/chokidar/lib/nodefs-handler.js:455:19)
at FSWatcher.<anonymous> (/home/lakshay/Desktop/edit/node_modules/webpack-dev-server/node_modules/chokidar/lib/nodefs-handler.js:460:16)
at FSReqWrap.oncomplete (fs.js:185:5)
Emitted 'error' event at:
at FSWatcher._handleError (/home/lakshay/Desktop/edit/node_modules/webpack-dev-server/node_modules/chokidar/index.js:257:10)
at createFsWatchInstance (/home/lakshay/Desktop/edit/node_modules/webpack-dev-server/node_modules/chokidar/lib/nodefs-handler.js:39:5)
at setFsWatchListener (/home/lakshay/Desktop/edit/node_modules/webpack-dev-server/node_modules/chokidar/lib/nodefs-handler.js:80:15)
[... lines matching original stack trace ...]
at FSReqWrap.oncomplete (fs.js:185:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! collabeditor@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the collabeditor@0.1.0 start script.
npm ERR! This is probably not a problem with npm.
上面可能还有其他日志记录输出。
npm ERR! A complete log of this run can be found in:
npm ERR! /home/lakshay/.npm/_logs/2018-07-13T06_10_25_773Z-debug.log
答案 0 :(得分:0)
根据错误消息,您的磁盘已满(HDD或SSD),释放了一些空间。
Error: ENOSPC: no space left on device
答案 1 :(得分:0)
echo fs.inotify.max_user_watches=524288 |
sudo tee -a /etc/sysctl.conf && sudo sysctl -p
在Ubuntu 18.04.1 LTS中工作