ReactJS-react-scripts问题开始

时间:2019-03-30 16:51:52

标签: node.js reactjs npm visual-studio-code

我当前在Ubuntu 18.04中使用Visual Studio Code。 当我运行我的简单React应用时,它运行良好。但是,当我关闭VSS并重新打开VSS并运行命令“ npm start”时,出现以下错误:

Starting the development server...

events.js:183
      throw er; // Unhandled 'error' event
      ^

Error: watch /home/gautham/Projects/counter-app/public ENOSPC
    at FSWatcher.start (fs.js:1382:19)
    at Object.fs.watch (fs.js:1408:11)
    at createFsWatchInstance (/home/gautham/Projects/counter-app/node_modules/chokidar/lib/nodefs-handler.js:38:15)
    at setFsWatchListener (/home/gautham/Projects/counter-app/node_modules/chokidar/lib/nodefs-handler.js:81:15)
    at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/gautham/Projects/counter-app/node_modules/chokidar/lib/nodefs-handler.js:233:14)
    at FSWatcher.NodeFsHandler._handleDir (/home/gautham/Projects/counter-app/node_modules/chokidar/lib/nodefs-handler.js:429:19)
    at FSWatcher.<anonymous> (/home/gautham/Projects/counter-app/node_modules/chokidar/lib/nodefs-handler.js:477:19)
    at FSWatcher.<anonymous> (/home/gautham/Projects/counter-app/node_modules/chokidar/lib/nodefs-handler.js:482:16)
    at FSReqWrap.oncomplete (fs.js:153:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! counter-app@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the counter-app@0.1.0 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/gautham/.npm/_logs/2019-03-30T16_36_01_292Z-debug.log

当我删除node_modules文件夹并运行'npm install'命令时,该应用程序成功运行。但是,如果我关闭并重新打开VSS,则会再次遇到相同的问题。

我以前在Windows中还没有遇到过这个问题。 我使用的节点版本:8.15.1 我使用的NPM版本:6.4.1

请帮助我进行永久修复。

0 个答案:

没有答案