create-react-native-app: AwesomeProject@0.1.0 start: `react-native-scripts start`- ERR! Exit status 1

npm start fails

Go through the few steps at https://facebook.github.io/react-native/docs/getting-started.html

type npm start

And get this:

> AwesomeProject@0.1.0 start /Users/nige/react-native/AwesomeProject
> react-native-scripts start

12:23:22 PM: 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! Darwin 16.6.0
npm ERR! argv "/Users/nige/.nvm/versions/node/v7.10.1/bin/node" "/Users/nige/.nvm/versions/node/v7.10.1/bin/npm" "start"
npm ERR! node v7.10.1
npm ERR! npm  v4.2.0
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 'react-native-scripts start'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the AwesomeProject package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     react-native-scripts start
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs AwesomeProject
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls AwesomeProject
npm ERR! There is likely additional logging output above.

Here’s the log file:

0 info it worked if it ends with ok
1 verbose cli [ '/Users/nige/.nvm/versions/node/v7.10.1/bin/node',
1 verbose cli   '/Users/nige/.nvm/versions/node/v7.10.1/bin/npm',
1 verbose cli   'start' ]
2 info using npm@4.2.0
3 info using node@v7.10.1
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: /Users/nige/.nvm/versions/node/v7.10.1/lib/node_modules/npm/bin/node-gyp-bin:/Users/nige/react-native/AwesomeProject/node_modules/.bin:/Users/nige/.nvm/versions/node/v7.10.1/bin:/Users/nige/bin/Sencha/Cmd/6.1.2.5/..:/Users/nige/bin/Sencha/Cmd/6.1.1.76/..:/Users/nige/bin/Sencha/Cmd/6.0.3.34/..:/Users/nige/bin/Sencha/Cmd/6.0.3.34/..:/Users/nige/bin/Sencha/Cmd/6.0.2.8/..:/Users/nige/bin/Sencha/Cmd/6.0.2.8/..:/Users/nige/bin/Sencha/Cmd/6.0.1.75/..:/Users/nige/bin/Sencha/Cmd/6.0.1.64/..:/Users/nige/bin/Sencha/Cmd:/Users/nige/bin/Sencha/Cmd:/Users/nige/bin/Sencha/Cmd:/Users/nige/bin/Sencha/Cmd:/Users/nige/bin/Sencha/Cmd:/Users/nige/bin/Sencha/Cmd:/Users/nige/bin/Sencha/Cmd:/Users/nige/bin/Sencha/Cmd:/Users/nige/bin/Sencha/Cmd:/Users/nige/bin/Sencha/Cmd/6.0.0.122:/Users/nige/bin/Sencha/Cmd/6.0.0.119:/Users/nige/bin/Sencha/Cmd/6.0.0.117:/Users/nige/bin/Sencha/Cmd/6.0.0.101:/Users/nige/bin/Sencha/Cmd/6.0.0.99:/Users/nige/bin/Sencha/Cmd/6.0.0.81:/Users/nige/bin/Sencha/Cmd/6.0.0.50:/Users/nige/bin/Sencha/Cmd/6.0.0.46:/Users/nige/bin/Sencha/Cmd/6.0.0.45:/Users/nige/bin/Sencha/Cmd/6.0.0.42:/Users/nige/bin/Sencha/Cmd/5.5.0.31:/Users/nige/bin/Sencha/Cmd/5.5.0.16:/Users/nige/bin/Sencha/Cmd/5.1.1.38:/Users/nige/bin/Sencha/Cmd/5.1.0.26:/Users/nige/bin/Sencha/Cmd/5.1.0.25:/Users/nige/bin/Sencha/Cmd/5.1.0.20:/Users/nige/bin/Sencha/Cmd/5.1.0.21:/Users/nige/bin/Sencha/Cmd/5.1.0.13:/Users/nige/bin/Sencha/Cmd/5.1.0.11:/Users/nige/bin/Sencha/Cmd/5.1.0.6:/Users/nige/bin/Sencha/Cmd/5.0.3.324:/Users/nige/bin/Sencha/Cmd/5.0.3.317:/Users/nige/bin/Sencha/Cmd/5.0.1.224:/Users/nige/bin/Sencha/Cmd/5.0.1.219:/Users/nige/bin/Sencha/Cmd/5.0.1.214:/Users/nige/bin/Sencha/Cmd/5.0.1.211:/Users/nige/bin/Sencha/Cmd/6.2.0.46/..:/Users/nige/bin/Sencha/Cmd/6.2.0.36/..:/Users/nige/bin/Sencha/Cmd/6.2.0.22/..:/Users/nige/bin/Sencha/Cmd/6.2.0.14/..:/Users/nige/bin/Sencha/Cmd/6.2.0.4/..:/Users/nige/bin/Sencha/Cmd/6.1.3.16/..:/Users/nige/bin/Sencha/Cmd/6.0.0.122:/Users/nige/bin/Sencha/Cmd/6.0.0.119:/Users/nige/bin/Sencha/Cmd/6.0.0.117:/Users/nige/bin/Sencha/Cmd/6.0.0.101:/Users/nige/bin/Sencha/Cmd/6.0.0.99:/Users/nige/bin/Sencha/Cmd/6.0.0.81:/Users/nige/bin/Sencha/Cmd/6.0.0.50:/Users/nige/bin/Sencha/Cmd/6.0.0.46:/Users/nige/bin/Sencha/Cmd/6.0.0.45:/Users/nige/bin/Sencha/Cmd/6.0.0.42:/Users/nige/bin/Sencha/Cmd/5.5.0.31:/Users/nige/bin/Sencha/Cmd/5.5.0.16:/Users/nige/bin/Sencha/Cmd/5.1.1.38:/Users/nige/bin/Sencha/Cmd/5.1.0.26:/Users/nige/bin/Sencha/Cmd/5.1.0.25:/Users/nige/bin/Sencha/Cmd/5.1.0.20:/Users/nige/bin/Sencha/Cmd/5.1.0.21:/Users/nige/bin/Sencha/Cmd/5.1.0.13:/Users/nige/bin/Sencha/Cmd/5.1.0.11:/Users/nige/bin/Sencha/Cmd/5.1.0.6:/Users/nige/bin/Sencha/Cmd/5.0.3.324:/Users/nige/bin/Sencha/Cmd/5.0.3.317:/Users/nige/bin/Sencha/Cmd/5.0.1.224:/Users/nige/bin/Sencha/Cmd/5.0.1.219:/Users/nige/bin/Sencha/Cmd/5.0.1.214:/Users/nige/bin/Sencha/Cmd/5.0.1.211:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin
10 verbose lifecycle AwesomeProject@0.1.0~start: CWD: /Users/nige/react-native/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> (/Users/nige/.nvm/versions/node/v7.10.1/lib/node_modules/npm/lib/utils/lifecycle.js:279:16)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at EventEmitter.emit (events.js:194:7)
14 verbose stack     at ChildProcess.<anonymous> (/Users/nige/.nvm/versions/node/v7.10.1/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at ChildProcess.emit (events.js:194:7)
14 verbose stack     at maybeClose (internal/child_process.js:899:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid AwesomeProject@0.1.0
16 verbose cwd /Users/nige/react-native/AwesomeProject
17 error Darwin 16.6.0
18 error argv "/Users/nige/.nvm/versions/node/v7.10.1/bin/node" "/Users/nige/.nvm/versions/node/v7.10.1/bin/npm" "start"
19 error node v7.10.1
20 error npm  v4.2.0
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 'react-native-scripts start'.
24 error Make sure you have the latest version of node.js and npm installed.
24 error If you do, this is most likely a problem with the AwesomeProject package,
24 error not with npm itself.
24 error Tell the author that this fails on your system:
24 error     react-native-scripts start
24 error You can get information on how to open an issue for this project with:
24 error     npm bugs AwesomeProject
24 error Or if that isn't available, you can get their info via:
24 error     npm owner ls AwesomeProject
24 error There is likely additional logging output above.
25 verbose exit [ 1, true ]

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 32
  • Comments: 41 (2 by maintainers)

Most upvoted comments

As suggested at the error message, installing watchman solved this error for me (OSX 10.9.5). It seems like that the necessity of watchman should be mentioned in README.

In addition, you may have to touch .watchmanconfig and git init on your project’s root to solve the following error:

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: query failed: synchronization failed: No such file or directory. Make sure watchman is running for this project. See https://facebook.github.io/watchman/docs/troubleshooting.html.

I had the same error. So, the terminal mentions either to install watchman or type in the following code:

sudo sysctl -w kern.maxfiles=5242880 sudo sysctl -w kern.maxfilesperproc=524288

I tried the code and it worked. Looking at the other replies, I’m guessing watchman also works, but to me typing two lines of code seemed like the easier option.

Downgrade the npm version 5 to 4 by command npm install -g npm@4.6.1 and it works

Problem fixed by installing watchman: brew install watchman

downgrading to 4 and adding these two lines worked for me.

sudo sysctl -w kern.maxfiles=5242880 sudo sysctl -w kern.maxfilesperproc=524288

Thanks @ashwanth1109

Watchman was the solution for me as well.

Only on OS 10.6 and earlier you should increase the pre-process descriptor limit. To do it temporary you can just type in your terminal the following:

$ sudo sysctl -w kern.maxfiles=10485760 $ sudo sysctl -w kern.maxfilesperproc=1048576

Otherwise, if you’d like to keep them always, modify /etc/sysctl.conf with these new values:

kern.maxfiles=10485760 kern.maxfilesperproc=1048576

This worked for me and is faster than installing watchman!

sudo sysctl -w kern.maxfiles=5242880 sudo sysctl -w kern.maxfilesperproc=524288

How on earth is anyone supposed to figure this out on their own without Google. The error thats related to this is nonsense!

FWIW, In the Ruby community, if a dependency is missing we actually tell you about it instead of letting the thread go splat. Something along the lines of “watchman could not be found. Please run brew install watchman and try again”. JavaScript community…you all have so much to learn still.

Run the following commands, copy from your terminal. It works for me well.

sudo sysctl -w kern.maxfiles=5242880 sudo sysctl -w kern.maxfilesperproc=524288

Both the solutions would work as suggested above:

  1. Update brew and install watchman
  2. Increase the processing kernel files size

Why are we supposed to change the kernel’s max files parameters to fix this? That’s not something you change without thinking about it. Does React Native open an absurd number of files or something?