Failed to exec start script - EventEmitter. (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:279:16)
Failed to exec start script - EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:279:16)
I have installed node 8.10 and downgrade to npm 4 because i have error message with npm 5.
*******************************************************************************
ERROR: npm 5 is not supported yet
Then I use the command to downgrade npm
npm install -g npm@4.
So I create my projet
$>npm install -g create-react-native-app
$>create-react-native-app AwesomeProject
$>cd AwesomeProject
$>npm start
And then I have the following error message.
> AwesomeProject@0.1.0 start /private/var/root/AwesomeProject
> react-native-scripts start
09:42:16: Unable to start server
See https://git.io/v5vcn for more information, either install watchman or run the following snippet:
sudo sysctl -w kern.maxfiles=5242880
sudo sysctl -w kern.maxfilesperproc=524288
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! AwesomeProject@0.1.0 start: `react-native-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the AwesomeProject@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! /var/root/.npm/_logs/2018-03-23T08_42_16_152Z-debug.log
I have a look to the logfile
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ]
2 info using npm@4.6.1
3 info using node@v8.10.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle AwesomeProject@0.1.0~prestart: AwesomeProject@0.1.0
6 silly lifecycle AwesomeProject@0.1.0~prestart: no script for prestart, continuing
7 info lifecycle AwesomeProject@0.1.0~start: AwesomeProject@0.1.0
8 verbose lifecycle AwesomeProject@0.1.0~start: unsafe-perm in lifecycle true
9 verbose lifecycle AwesomeProject@0.1.0~start: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/private/var/root/AwesomeProject/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin
10 verbose lifecycle AwesomeProject@0.1.0~start: CWD: /private/var/root/AwesomeProject
11 silly lifecycle AwesomeProject@0.1.0~start: Args: [ '-c', 'react-native-scripts start' ]
12 silly lifecycle AwesomeProject@0.1.0~start: Returned: code: 1 signal: null
13 info lifecycle AwesomeProject@0.1.0~start: Failed to exec start script
14 verbose stack Error: AwesomeProject@0.1.0 start: `react-native-scripts start`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:279:16)
14 verbose stack at emitTwo (events.js:126:13)
14 verbose stack at EventEmitter.emit (events.js:214:7)
14 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack at emitTwo (events.js:126:13)
14 verbose stack at ChildProcess.emit (events.js:214:7)
14 verbose stack at maybeClose (internal/child_process.js:925:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
15 verbose pkgid AwesomeProject@0.1.0
16 verbose cwd /private/var/root/AwesomeProject
17 verbose Darwin 17.2.0
18 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
19 verbose node v8.10.0
20 verbose npm v4.6.1
21 error code ELIFECYCLE
22 error errno 1
23 error AwesomeProject@0.1.0 start: `react-native-scripts start`
23 error Exit status 1
24 error Failed at the AwesomeProject@0.1.0 start script.
24 error This is probably not a problem with npm. There is likely additional logging output above.
25 verbose exit [ 1, true ]
Have you an idea?
Best regard.
I try it and I have the same behaviors. I have realized all my action as root.
– xduris
Mar 23 at 10:35
1 Answer
1
Try these steps:
npm install -g npm@latest
rm -rf node_modules
npm install
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Try run with sudo npm start
– Artur P.
Mar 23 at 10:02