Create-react-native-app: Unable to start application via npm start

Created on 15 Nov 2017  ยท  8Comments  ยท  Source: expo/create-react-native-app

Description

I am not able to start application via npm start

Expected Behavior

I am able to start application and visit in my iPhone.

Observed Behavior

Application does not start.
Full terminal output is:

$ npm start

> [email protected] start /home/phracek/work/programming/Ruzenec_iOS
> react-native-scripts start

10:35:25 AM: Unable to start server
  See https://git.io/v5vcn for more information, either install watchman or run the following snippet:
    sudo sysctl -w fs.inotify.max_user_instances=1024
    sudo sysctl -w fs.inotify.max_user_watches=12288

npm ERR! Linux 4.13.11-200.fc26.x86_64
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "start"
npm ERR! node v6.11.5
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `react-native-scripts start`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] 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 Ruzenec_iOS 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 Ruzenec_iOS
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls Ruzenec_iOS
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/phracek/work/programming/Ruzenec_iOS/npm-debug.log

Environment

Please run these commands in the project folder and fill in their results:

  • npm ls react-native-scripts:
[email protected] /home/phracek/work/programming/Ruzenec_iOS
โ””โ”€โ”€ [email protected]
  • npm ls react-native:
[email protected] /home/phracek/work/programming/Ruzenec_iOS
โ””โ”€โ”€ [email protected] 

  • npm ls expo:
[email protected] /home/phracek/work/programming/Ruzenec_iOS
โ””โ”€โ”ฌ [email protected] 
  โ””โ”€โ”€ UNMET PEER DEPENDENCY react@>=15.4.0

  • node -v: v6.11.5
  • npm -v: 3.10.10
  • yarn --version:
bash: yarn: command not found...
Packages providing this file are:
'hadoop-yarn'
'cmdtest'

  • watchman version:

Also specify:

  1. Operating system: Linux
  2. Phone/emulator/simulator & version:

Reproducible Demo

Please provide a minimized reproducible demonstration of the problem you're reporting.
I went through documentation mentioned here https://facebook.github.io/react-native/docs/getting-started.html

Most helpful comment

have you tried both commands:
sudo sysctl -w fs.inotify.max_user_instances=1024
sudo sysctl -w fs.inotify.max_user_watches=12288
they worked for me

All 8 comments

have you tried both commands:
sudo sysctl -w fs.inotify.max_user_instances=1024
sudo sysctl -w fs.inotify.max_user_watches=12288
they worked for me

Wow, it works

@kajm what does those commands actually do?

these two command worked for me :
sudo sysctl -w fs.inotify.max_user_instances=1024
sudo sysctl -w fs.inotify.max_user_watches=12288

and if you are on a windows environment?

I tried the above mentioned 2 commands. It still didnt work for me.
It waits for infinite time after "Starting packager..."
Please help

@omkarsk98 - sorry to hear you're having trouble ๐Ÿ˜ž It's pretty hard to help without knowing more information about your setup, though. Could you open a new issue and follow the template there? We'll be more likely to be able to help you then.

Running following worked for me on mac high sierra:
sudo sysctl -w kern.maxfiles=5242880
sudo sysctl -w kern.maxfilesperproc=524288

Was this page helpful?
0 / 5 - 0 ratings