1

The npm version is 4.6.1 Also refer the github link

I created a normal hello world application and tried

create-react-native-app HelloWorldVatsal

it created the app and loaded all modules etc and gave success message on the terminal

After that did as below

cd HelloWorldVatsal
npm start

HelloWorldVatsal@0.1.0 start /home/mvix-vatsal/HelloWorldVatsal
react-native-scripts start

14:52:58: 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! code ELIFECYCLE
npm ERR! errno 1
npm ERR! HelloWorldVatsal@0.1.0 start: `react-native-scripts start`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the HelloWorldVatsal@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/mvix-vatsal/.npm/_logs/2018-02-19T09_22_58_504Z-debug.log
bennygenel
  • 23,896
  • 6
  • 65
  • 78
Vatsal Desai
  • 311
  • 3
  • 15

3 Answers3

3

As you can see from the error message lines that shown below;

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

You need to install watchman or run the snippets shown in the error message.

bennygenel
  • 23,896
  • 6
  • 65
  • 78
  • Thanks.This resolves the issue, however, watchman is not supported now by npm and they mention it as obsolete.Is there any way to install watchman? – Vatsal Desai Feb 20 '18 at 09:21
1

Just installing watchman worked for me :D

my system (mac) --> OSX 10.12.3

brew update

brew install watchman
Alberto Ruiz
  • 376
  • 2
  • 8
0

Running following worked for me on mac:

sudo sysctl -w kern.maxfiles=5242880

sudo sysctl -w kern.maxfilesperproc=524288

Shobhit Mishra
  • 337
  • 1
  • 2
  • 13