npm在React项目上启动时开始抛出错误

时间:2018-12-15 15:48:51

标签: reactjs npm npm-start

运行<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="text"/> 命令时,出现以下错误:

npm start

正如在类似问题的博客中所提到的,我实现了所有建议,例如Starting the development server... events.js:183 throw er; // Unhandled 'error' event ^ Error: watch /home/ruchit/codes/react/myapp/public ENOSPC at FSWatcher.start (fs.js:1382:19) at Object.fs.watch (fs.js:1408:11) at createFsWatchInstance (/home/ruchit/codes/react/myapp/node_modules/chokidar/lib/nodefs-handler.js:37:15) at setFsWatchListener (/home/ruchit/codes/react/myapp/node_modules/chokidar/lib/nodefs-handler.js:80:15) at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/ruchit/codes/react/myapp/node_modules/chokidar/lib/nodefs-handler.js:232:14) at FSWatcher.NodeFsHandler._handleDir (/home/ruchit/codes/react/myapp/node_modules/chokidar/lib/nodefs-handler.js:414:19) at FSWatcher.<anonymous> (/home/ruchit/codes/react/myapp/node_modules/chokidar/lib/nodefs-handler.js:462:19) at FSWatcher.<anonymous> (/home/ruchit/codes/react/myapp/node_modules/chokidar/lib/nodefs-handler.js:467:16) at FSReqWrap.oncomplete (fs.js:153:5) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! myapp@0.1.0 start: `react-scripts start` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the myapp@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/ruchit/.npm/_logs/2018-12-15T15_05_28_201Z-debug.log 等。以上都不起作用。我要添加此过程的完整日志:

updating npm / node, install yarn, install watchman

请建议我如何解决此问题?我应该重新安装create-react-app吗?我正在使用0 info it worked if it ends with ok 1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'start' ] 2 info using npm@6.5.0 3 info using node@v8.14.0 4 verbose run-script [ 'prestart', 'start', 'poststart' ] 5 info lifecycle myapp@0.1.0~prestart: myapp@0.1.0 6 info lifecycle myapp@0.1.0~start: myapp@0.1.0 7 verbose lifecycle myapp@0.1.0~start: unsafe-perm in lifecycle true 8 verbose lifecycle myapp@0.1.0~start: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/ruchit/codes/react/myapp/node_modules/.bin:/home/ruchit/bin:/home/ruchit/.local/bin:/home/ruchit/bin:/home/ruchit/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin 9 verbose lifecycle myapp@0.1.0~start: CWD: /home/ruchit/codes/react/myapp 10 silly lifecycle myapp@0.1.0~start: Args: [ '-c', 'react-scripts start' ] 11 silly lifecycle myapp@0.1.0~start: Returned: code: 1 signal: null 12 info lifecycle myapp@0.1.0~start: Failed to exec start script 13 verbose stack Error: myapp@0.1.0 start: `react-scripts start` 13 verbose stack Exit status 1 13 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16) 13 verbose stack at emitTwo (events.js:126:13) 13 verbose stack at EventEmitter.emit (events.js:214:7) 13 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14) 13 verbose stack at emitTwo (events.js:126:13) 13 verbose stack at ChildProcess.emit (events.js:214:7) 13 verbose stack at maybeClose (internal/child_process.js:915:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5) 14 verbose pkgid myapp@0.1.0 15 verbose cwd /home/ruchit/codes/react/myapp 16 verbose Linux 4.15.0-33-generic 17 verbose argv "/usr/bin/node" "/usr/bin/npm" "start" 18 verbose node v8.14.0 19 verbose npm v6.5.0 20 error code ELIFECYCLE 21 error errno 1 22 error myapp@0.1.0 start: `react-scripts start` 22 error Exit status 1 23 error Failed at the myapp@0.1.0 start script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 1, true ]

0 个答案:

没有答案