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

bundle fails on freshly initialized project #1143

Closed
fcanas opened this issue May 4, 2015 · 5 comments
Closed

bundle fails on freshly initialized project #1143

fcanas opened this issue May 4, 2015 · 5 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@fcanas
Copy link

fcanas commented May 4, 2015

bundle fails when run on a freshly initialized project with no changes.

Steps to reproduce:

$ react-native init Base
...
$ cd Base/
$ react-native bundle
Building package...

/Users/fcanas/github/ReactNativeExperiments/Base/node_modules/react-native/node_modules/bluebird/js/main/promise.js:626
            throw e;
                  ^
Error: EMFILE, open '/Users/fcanas/github/ReactNativeExperiments/Base/node_modules/react-native/node_modules/react-tools/src/browser/ui/dom/ViewportMetrics.js'

Expected Results:

Not sure, as I've never gotten the bundle command to work, but I think I want to see a single .js file output suitable for providing to a React view in some sort of static fashion.

Actual results:
Error and no file output

Notes:
node v0.10.38
react-native-cli v1.4.28

@frantic
Copy link
Contributor

frantic commented May 4, 2015

Weird. See #1123 and #1096 for quickfix (update node)

@frantic
Copy link
Contributor

frantic commented May 4, 2015

Ok but the real problem is actually low ulimit :(
Run ulimit -n 2560 from the terminal before react-native bundle. Fix coming

@fcanas
Copy link
Author

fcanas commented May 4, 2015

Updating node works for me. I have no reason for running v0.10 other than that's what I ended up with after a long, blind, stumbling process of getting this up and running.

Thanks for your help!

@frantic
Copy link
Contributor

frantic commented May 4, 2015

Talked to @amasad - we are going to use something like graceful-fs in packager

@amasad
Copy link
Contributor

amasad commented May 11, 2015

This should be fixed now: see

function useGracefulFs() {
var fs = require('fs');
var gracefulFs = require('graceful-fs');
// A bit sneaky but it's not straightforward to update all the
// modules we depend on.
Object.keys(fs).forEach(function(method) {
if (typeof fs[method] === 'function' && gracefulFs[method]) {
fs[method] = gracefulFs[method];
}
});
}

reopen if it's still a problem

@amasad amasad closed this as completed May 11, 2015
@facebook facebook locked as resolved and limited conversation to collaborators May 29, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 22, 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

4 participants