Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to start react-native package manager #10188

Closed
kalvish21 opened this issue Sep 30, 2016 · 14 comments
Closed

Unable to start react-native package manager #10188

kalvish21 opened this issue Sep 30, 2016 · 14 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@kalvish21
Copy link

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! swift-2048@0.0.1 start: `node node_modules/react-native/local-cli/cli.js start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the swift-2048@0.0.1 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
@kalvish21 kalvish21 changed the title Unable to start react package manager Unable to start react-ative package manager Sep 30, 2016
@kalvish21 kalvish21 changed the title Unable to start react-ative package manager Unable to start react-native package manager Sep 30, 2016
@rybarix
Copy link

rybarix commented Oct 2, 2016

@tulasi-ram
Copy link

tulasi-ram commented Oct 5, 2016

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] Building Dependency Graph
[10/5/2016, 6:53:12 PM] Crawling File System
[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. (/home/tulasiram/AndroidStudioProjects/DemoWebBridge/node_modules/sane/src/node_watcher.js:353:12)
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

@tulasi-ram
Copy link

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}

@chachaxw
Copy link

chachaxw commented Oct 9, 2016

How do you solve this problem? I really don't know what's going on here, can you help me?

@tulasi-ram
Copy link

@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

@chachaxw
Copy link

@tulasi-ram I have solved this problem. I forgot install watchman

@ericvicenti
Copy link
Contributor

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.

@artforlife
Copy link

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?

@iboxgithub
Copy link
Contributor

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!

@ericvicenti
Copy link
Contributor

@iboxgithub, what is the fix? Would you mind submitting a pull request for it?

@iboxgithub
Copy link
Contributor

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

@iboxgithub
Copy link
Contributor

Ha... you are a FB dev...my comment looks weird now 🥇

@ericvicenti
Copy link
Contributor

ericvicenti commented Feb 25, 2017

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

iboxgithub added a commit to iboxgithub/react-native that referenced this issue Feb 25, 2017
@iboxgithub
Copy link
Contributor

Done, with some explanation in order to understand why this happens, let me know if it is ok

facebook-github-bot pushed a commit that referenced this issue Mar 9, 2017
Summary:
Following ericvicenti request on #10188 (comment)
Hope it helps

Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:

> **Unless you are a React Native release maintainer and cherry-picking an *existing* commit into a current release, ensure your pull request is targeting the `master` React Native branch.**

Explain the **motivation** for making this change. What existing problem does the pull request solve?

Prefer **small pull requests**. These are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.

**Test plan (required)**

Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI.

Make sure tests pass on both Travis and Circle CI.

**Code formatting**

Look around. Match the style of the rest of the codebase. See also
Closes #12578

Differential Revision: D4682076

Pulled By: mkonicek

fbshipit-source-id: 2fab5355a066eb3d8333e50f07ab3a258cbc002b
hramos pushed a commit that referenced this issue Mar 9, 2017
Summary:
Following ericvicenti request on #10188 (comment)
Hope it helps

Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:

> **Unless you are a React Native release maintainer and cherry-picking an *existing* commit into a current release, ensure your pull request is targeting the `master` React Native branch.**

Explain the **motivation** for making this change. What existing problem does the pull request solve?

Prefer **small pull requests**. These are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.

**Test plan (required)**

Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI.

Make sure tests pass on both Travis and Circle CI.

**Code formatting**

Look around. Match the style of the rest of the codebase. See also
Closes #12578

Differential Revision: D4682076

Pulled By: mkonicek

fbshipit-source-id: 2fab5355a066eb3d8333e50f07ab3a258cbc002b
@facebook facebook locked as resolved and limited conversation to collaborators May 24, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

8 participants