ERR!代码ELIFECYCLE在运行NPM开始

问题描述:

我已经运行NPM开始,NPM运行启动,须藤NPM启动和须藤NPM运行启动,纱开始,须藤纱线开始和我得到了同样的错误:ERR!代码ELIFECYCLE在运行NPM开始

Loading dependency graph...jest-haste-map: Watchman crawl failed. Retrying once with node crawler. 
    Usually this happens when watchman isn't running. Create an empty `.watchmanconfig` file in your project's root folder or initialize a git or hg repository in your project. 
    Error: Watchman error: A non-recoverable condition has triggered. Watchman needs your help! 
The triggering condition was at timestamp=1507837337: inotify-add-watch(/home/mohammad/foobar_react_native/node_modules/is-arrayish) -> The user limit on the total number of inotify watches was reached; increase the fs.inotify.max_user_watches sysctl 
All requests will continue to fail with this message until you resolve 
the underlying problem. You will find more information on fixing this at 
https://facebook.github.io/watchman/docs/troubleshooting.html#poison-inotify-add-watch. Make sure watchman is running for this project. See https://facebook.github.io/watchman/docs/troubleshooting.html. 
ERROR A non-recoverable condition has triggered. Watchman needs your help! 
The triggering condition was at timestamp=1507837337: inotify-add-watch(/home/mohammad/foobar_react_native/node_modules/is-arrayish) -> The user limit on the total number of inotify watches was reached; increase the fs.inotify.max_user_watches sysctl 
All requests will continue to fail with this message until you resolve 
the underlying problem. You will find more information on fixing this at 
https://facebook.github.io/watchman/docs/troubleshooting.html#poison-inotify-add-watch 

Loading dependency graph...npm ERR! code ELIFECYCLE 
npm ERR! errno 11 
npm ERR! [email protected] start: `node node_modules/react-native/local-cli/cli.js start` 
npm ERR! Exit status 11 
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/mohammad/.npm/_logs/2017-10-12T19_42_19_386Z-debug.log 

这里是调试日志:

cat /home/mohammad/.npm/_logs/2017-10-12T19_43_55_751Z-debug.log 
0 info it worked if it ends with ok 
1 verbose cli [ '/usr/bin/node', '/usr/local/bin/npm', 'run', 'start' ] 
2 info using [email protected] 
3 info using [email protected] 
4 verbose run-script [ 'prestart', 'start', 'poststart' ] 
5 info lifecycle [email protected]~prestart: [email protected] 
6 info lifecycle [email protected]~start: [email protected] 
7 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true 
8 verbose lifecycle [email protected]~start: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/home/mohammad/foobar_react_native/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin 
9 verbose lifecycle [email protected]~start: CWD: /home/mohammad/foobar_react_native 
10 silly lifecycle [email protected]~start: Args: [ '-c', 
10 silly lifecycle 'node node_modules/react-native/local-cli/cli.js start' ] 
11 silly lifecycle [email protected]~start: Returned: code: 11 signal: null 
12 info lifecycle [email protected]~start: Failed to exec start script 
13 verbose stack Error: [email protected] start: `node node_modules/react-native/local-cli/cli.js start` 
13 verbose stack Exit status 11 
13 verbose stack  at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:280:16) 
13 verbose stack  at emitTwo (events.js:125:13) 
13 verbose stack  at EventEmitter.emit (events.js:213:7) 
13 verbose stack  at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14) 
13 verbose stack  at emitTwo (events.js:125:13) 
13 verbose stack  at ChildProcess.emit (events.js:213:7) 
13 verbose stack  at maybeClose (internal/child_process.js:927:16) 
13 verbose stack  at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5) 
14 verbose pkgid [email protected] 
15 verbose cwd /home/mohammad/foobar_react_native 
16 verbose Linux 4.10.0-32-generic 
17 verbose argv "/usr/bin/node" "/usr/local/bin/npm" "run" "start" 
18 verbose node v8.5.0 
19 verbose npm v5.4.2 
20 error code ELIFECYCLE 
21 error errno 11 
22 error [email protected] start: `node node_modules/react-native/local-cli/cli.js start` 
22 error Exit status 11 
23 error Failed at the [email protected] start script. 
23 error This is probably not a problem with npm. There is likely additional logging output above. 
24 verbose exit [ 11, true ] 

我该如何解决这个问题?

我已经试过rm -rf node_modules && npm install.

我已经试过

watchman watch-del-all 
watchman shutdown-server 

这里是我的项目目录:

drwxrwxr-x 9 mohammad mohammad 4096 Oct 12 15:49 . 
drwxr-xr-x 48 mohammad mohammad 4096 Oct 12 00:47 .. 
drwxrwxr-x 7 mohammad mohammad 4096 Oct 12 01:24 android 
-rw-rw-r-- 1 mohammad mohammad 1164 Oct 12 00:47 App.js 
-rw-rw-r-- 1 mohammad mohammad  75 Oct 12 00:47 app.json 
-rw-rw-r-- 1 mohammad mohammad  34 Oct 12 00:47 .babelrc 
-rw-rw-r-- 1 mohammad mohammad 114 Oct 12 00:47 .buckconfig 
-rw-rw-r-- 1 mohammad mohammad 1445 Oct 12 00:47 .flowconfig 
drwxrwxr-x 2 mohammad mohammad 4096 Oct 12 01:08 gen 
drwxrwxr-x 8 mohammad mohammad 4096 Oct 12 15:42 .git 
-rw-rw-r-- 1 mohammad mohammad  16 Oct 12 00:47 .gitattributes 
-rw-rw-r-- 1 mohammad mohammad 763 Oct 12 00:47 .gitignore 
drwxrwxr-x 3 mohammad mohammad 4096 Oct 12 15:30 .idea 
-rw-rw-r-- 1 mohammad mohammad 135 Oct 12 00:47 index.js 
drwxrwxr-x 7 mohammad mohammad 4096 Oct 12 00:47 ios 
drwxrwxr-x 575 mohammad mohammad 20480 Oct 12 15:49 node_modules 
-rw-rw-r-- 1 mohammad mohammad 450 Oct 12 15:49 package.json 
-rw-rw-r-- 1 mohammad mohammad 209155 Oct 12 15:49 package-lock.json 
drwxrwxr-x 2 mohammad mohammad 4096 Oct 12 00:47 __tests__ 
-rw-rw-r-- 1 mohammad mohammad  2 Oct 12 00:47 .watchmanconfig 
-rw-rw-r-- 1 mohammad mohammad 157444 Oct 12 00:47 yarn.lock 

守望版本:4.7.0

反应母语版本:

反应母语-CLI:2.0.1 反应母语:0.49.3

.watchmanconfig文件:

{} 

谁能告诉我如何解决它?

解决运行:


sudo npm install -g watchman 
sudo npm run start