【发布时间】:2018-12-25 21:57:22
【问题描述】:
我目前正在做一个 React 项目,并且已经开发了基本组件。昨天一切正常。然后我开始了一个新的 react native 项目。使用 create-react-native-app 安装项目后,npm start 命令无法启动服务器,但它对 react 项目运行良好。
我使用的是节点 10.6 和 npm 5.6。在阅读了一些建议后,我将 node 更改为 v8.11,将 npm 更改为 6.2。安装 watchman 并更换 inotify 手表后,我终于启动了原生应用程序。
今天尝试启动react项目,服务器没有启动。 这就是终端显示的内容...
Starting the development server...
events.js:183
throw er; // Unhandled 'error' event
^
Error: watch /home/maneesh/source_code/react/ytc/public ENOSPC
at _errnoException (util.js:992:11)
at FSWatcher.start (fs.js:1382:19)
at Object.fs.watch (fs.js:1408:11)
at createFsWatchInstance (/home/maneesh/source_code/react/ytc/node_modules/webpack-dev-server/node_modules/chokidar/lib/nodefs-handler.js:37:15)
at setFsWatchListener (/home/maneesh/source_code/react/ytc/node_modules/webpack-dev-server/node_modules/chokidar/lib/nodefs-handler.js:80:15)
at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/maneesh/source_code/react/ytc/node_modules/webpack-dev-server/node_modules/chokidar/lib/nodefs-handler.js:228:14)
at FSWatcher.NodeFsHandler._handleDir (/home/maneesh/source_code/react/ytc/node_modules/webpack-dev-server/node_modules/chokidar/lib/nodefs-handler.js:407:19)
at FSWatcher.<anonymous> (/home/maneesh/source_code/react/ytc/node_modules/webpack-dev-server/node_modules/chokidar/lib/nodefs-handler.js:455:19)
at FSWatcher.<anonymous> (/home/maneesh/source_code/react/ytc/node_modules/webpack-dev-server/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! ytc@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ytc@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
我使用的是 ubuntu 18.04 节点 8.11 npm 6.2
知道可能是什么问题吗?
【问题讨论】: