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

Support for react-native #29

Open
Darkhorse-Fraternity opened this issue Oct 21, 2019 · 3 comments
Open

Support for react-native #29

Darkhorse-Fraternity opened this issue Oct 21, 2019 · 3 comments

Comments

@Darkhorse-Fraternity
Copy link

Support for react-native please

@dai-shi
Copy link
Owner

dai-shi commented Oct 21, 2019

I wasn't aware that. What is your problem?

Oh no, it doesn't work in Expo Snack.
https://snack.expo.io/H1bnzhqtr

If I download the snack, it seems to work in this case.

@dai-shi dai-shi added needs repro We need reproduction! question (waiting for answer) Further information is requested labels Nov 26, 2019
@alvinthen
Copy link

alvinthen commented Apr 15, 2020

I've been using this package on react, this is the first time I run it on react-native, here's the error I got

error: bundling failed: Error: Unable to resolve module `core-js/modules/es.symbol` from `node_modules/react-hooks-async/dist/use-async-run.js`: core-js/modules/es.symbol could not be found within the project.

If you are sure the module exists, try these steps:
 1. Clear watchman watches: watchman watch-del-all
 2. Delete node_modules: rm -rf node_modules and run yarn install
 3. Reset Metro's cache: yarn start --reset-cache
 4. Remove the cache: rm -rf /tmp/metro-*

yarn why core-js output

=> Found "core-js@2.6.11"
info Has been hoisted to "core-js"
info Reasons this module exists
   - Hoisted from "fbjs#core-js"
   - Hoisted from "react-native#metro-babel-register#core-js"
   - Hoisted from "react-native#fbjs-scripts#core-js"
info Disk size without dependencies: "7.68MB"
info Disk size with unique dependencies: "7.68MB"
info Disk size with transitive dependencies: "7.68MB"
info Number of shared dependencies: 0
=> Found "create-react-class#core-js@1.2.7"
info Reasons this module exists
   - "react-native#create-react-class#fbjs" depends on it
   - Hoisted from "react-native#create-react-class#fbjs#core-js"
info Disk size without dependencies: "4.37MB"
info Disk size with unique dependencies: "4.37MB"
info Disk size with transitive dependencies: "4.37MB"
info Number of shared dependencies: 0

Edit: Explicitly installing core-js@3 fixed it.

@dai-shi
Copy link
Owner

dai-shi commented Apr 15, 2020

Thanks for trying it out.
Yeah, the compiled code depends on core-js@3. We had a similar discussion in another issue, but I'm not really sure what's a good config for that. 😕

It's really glad to hear that it's working with explicit installing.
I could close this issue technically, but let's keep it open and look for a better solution.

@dai-shi dai-shi removed needs repro We need reproduction! question (waiting for answer) Further information is requested labels Apr 15, 2020
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

3 participants