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

react-native throw Error when importing asap #64

Closed
almeynman opened this issue Feb 23, 2016 · 8 comments
Closed

react-native throw Error when importing asap #64

almeynman opened this issue Feb 23, 2016 · 8 comments

Comments

@almeynman
Copy link

react-native throws

Unable to resolve module domain from /Users/almas/Projects/Demo/node_modules/asap/raw.js: Unable to find this module in its module map or any of the node_modules directories under /Users/node_modules/domain and its parent directories

I see that asap generated for react-native differs from that in a browser: raw.js has this line of code in it: require('domain'), which throws.

@jrm2k6
Copy link

jrm2k6 commented May 17, 2016

Any update on that?

@DanBeard
Copy link

For anyone else who finds this issue because react is complaining about asap. I was able to fix it using rn-nodeify .

@javascriptlove
Copy link

Just ran into same issue on Meteor when importing react-dnd, which imports asap

@kriskowal
Copy link
Owner

ASAP does depend on your module loader to respect the "browser" field in "package.json", per the behavior codified by Browserify. Please direct your questions and reference this ticket to the maintainers of your module system of choice.

Thank you for chiming in @DanBeard. That’s one expected mitigation.

@miguelHx
Copy link

Fixed this by running ./node_modules/react-native/scripts/packager.sh --resetCache

@andfaulkner
Copy link

I was able to fix this by running npm install in the project root directory.

@ThaJay
Copy link

ThaJay commented Nov 14, 2018

@andfaulkner I'm using yarn so that's not obvious (and should not work) but it does!

@gtsasil
Copy link

gtsasil commented Nov 22, 2018

I installed yarn after create the project then start get some warnings while I tried to install anything. So I uninstalled it and when tried to run "react-native run-ios" and got Error: Cannot find module 'asap/raw'.
To fix it I run npm install after read " @andfaulkner post.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants