I keep getting the below when trying to run npm start:
[11:27:51 AM] <START> Building Dependency Graph
[11:27:51 AM] <START> Crawling File System
[Hot Module Replacement] Server listening on /hot
React packager ready.
2016-09-30 11:27 node[3504] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
2016-09-30 11:27 node[3504] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
2016-09-30 11:27 node[3504] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
ERROR watch null EMFILE
{"code":"EMFILE","errno":"EMFILE","syscall":"watch null","filename":null}
Error: watch null EMFILE
at exports._errnoException (util.js:856:11)
at FSEvent.FSWatcher._handle.onchange (fs.js:1296:21)
See http://facebook.github.io/react-native/docs/troubleshooting.html
for common problems and solutions.
npm ERR! Darwin 16.0.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v5.6.0
npm ERR! npm v3.6.0
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `node node_modules/react-native/local-cli/cli.js start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'node node_modules/react-native/local-cli/cli.js 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 swift-2048 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node node_modules/react-native/local-cli/cli.js start
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs swift-2048
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls swift-2048
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/user/Downloads/swift-2048-master/npm-debug.log
User-MacBook-Pro:swift-2048-master user$
Why am I getting this? I"m using below versions:
react-native-cli: 1.0.0
react-native: 0.26.1
node: 6.2.0
Check this https://gist.github.com/DanHerbert/9520689
Some times getting below error message when run the command react-native start
DemoWebBridge$ react-native start
Scanning 583 folders for symlinks in /home/tulasiram/AndroidStudioProjects/DemoWebBridge/node_modules (5ms)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Running packager on port 8081. โ
โ โ
โ Keep this packager running while developing on any JS projects. Feel โ
โ free to close this tab and run your own packager instance if you โ
โ prefer. โ
โ โ
โ https://github.com/facebook/react-native โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Looking for JS files in
/home/tulasiram/AndroidStudioProjects/DemoWebBridge
[10/5/2016, 6:53:12 PM]
[10/5/2016, 6:53:12 PM]
[Hot Module Replacement] Server listening on /hot
React packager ready.
ERROR watch /home/tulasiram/AndroidStudioProjects/DemoWebBridge/node_modules/fbjs/node_modules/core-js/fn/regexp ENOSPC
{"code":"ENOSPC","errno":"ENOSPC","syscall":"watch /home/tulasiram/AndroidStudioProjects/DemoWebBridge/node_modules/fbjs/node_modules/core-js/fn/regexp","filename":"/home/tulasiram/AndroidStudioProjects/DemoWebBridge/node_modules/fbjs/node_modules/core-js/fn/regexp"}
Error: watch /home/tulasiram/AndroidStudioProjects/DemoWebBridge/node_modules/fbjs/node_modules/core-js/fn/regexp ENOSPC
at exports._errnoException (util.js:1036:11)
at FSWatcher.start (fs.js:1429:19)
at Object.fs.watch (fs.js:1456:11)
at NodeWatcher.watchdir (/home/tulasiram/AndroidStudioProjects/DemoWebBridge/node_modules/sane/src/node_watcher.js:144:20)
at Walker.
at emitTwo (events.js:106:13)
at Walker.emit (events.js:191:7)
at /home/tulasiram/AndroidStudioProjects/DemoWebBridge/node_modules/walker/lib/walker.js:69:16
at go$readdir$cb (/home/tulasiram/AndroidStudioProjects/DemoWebBridge/node_modules/graceful-fs/graceful-fs.js:149:14)
at go$readdir$cb (/home/tulasiram/AndroidStudioProjects/DemoWebBridge/node_modules/graceful-fs/graceful-fs.js:149:14)
See http://facebook.github.io/react-native/docs/troubleshooting.html
for common problems and solutions.
Using react-native version 0.34.1
Running in Ubuntu 14.04
Got the solution
run below command to solve the issue
ENOSPC means that there is no space on the drive.
using the following command in a terminal window we can simply increase the limit
echo fs.inotify.max_user_watches=582222 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
For Arch Linux add fs.inotify.max_user_watches=524288 to /etc/sysctl.d/99-sysctl.conf and then execute sysctl --system. This will also persist across reboots. {source stackoverflow}
How do you solve this problem? I really don't know what's going on here, can you help me?
@chachaxw are you able to run the react naive package manager.
if you unable to run the react native package manager and get the error related to "ENOSPC" than my solution will help you what i did as mentioned in above comment
@tulasi-ram I have solved this problem. I forgot install watchman
Looks like this is solved?
Feel free to re-open or file a new issue if there are still problems starting the packager with newer versions of RN.
I am experiencing this error after updating to OSX Sierra and installing Xcode 7.3. Prior to the update I had Yosemite and Xcode 7.2.
Any suggestions on how to resolve this?
Thank. You. So. Much.
Hey, Facebook, don't you think it might be good to fix this? You have a lot of people using React native on Ubuntu!
@iboxgithub, what is the fix? Would you mind submitting a pull request for it?
Hi, actually I just used the workaround, that's why I let a message for FB devs.
this worked for me by just running it in my terminal (Ubuntu)
echo fs.inotify.max_user_watches=582222 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
Ha... you are a FB dev...my comment looks weird now :1st_place_medal:
No worries, all of us at FB are just people!
Maybe you could add this workaround to the troubleshooting page?
http://facebook.github.io/react-native/releases/next/docs/troubleshooting.html#content
Done, with some explanation in order to understand why this happens, let me know if it is ok
Most helpful comment
Got the solution
run below command to solve the issue
ENOSPC means that there is no space on the drive.
using the following command in a terminal window we can simply increase the limit
echo fs.inotify.max_user_watches=582222 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
For Arch Linux add fs.inotify.max_user_watches=524288 to /etc/sysctl.d/99-sysctl.conf and then execute sysctl --system. This will also persist across reboots. {source stackoverflow}