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

Error compiling #7

Closed
alexstanbury opened this issue Apr 4, 2019 · 4 comments
Closed

Error compiling #7

alexstanbury opened this issue Apr 4, 2019 · 4 comments
Assignees

Comments

@alexstanbury
Copy link

I create a new project using latest create-react-app then install this lib.
I then paste in the useFetch demo code from the README.
When compiling I get the following error:

./node_modules/react-hooks-async/dist/use-async-task-fetch.js
Module not found: Can't resolve 'core-js/modules/es6.array.filter' in '/Users/mynamehere/Desktop/myprojectname/node_modules/react-hooks-async/dist'

It's strange because that module is definitely in that location inside node_modules. Any ideas? Thanks

@dai-shi
Copy link
Owner

dai-shi commented Apr 4, 2019

Hi, thanks for reporting.
Could you try replacing dist in the import lines to src please?

@alexstanbury
Copy link
Author

Thanks for the quick reply!

Setting to src fixes it and now works as expected.

@dai-shi
Copy link
Owner

dai-shi commented Apr 4, 2019

Good. I'll think about how I can resolve this...

@dai-shi dai-shi self-assigned this Apr 4, 2019
@dai-shi
Copy link
Owner

dai-shi commented Apr 16, 2019

https://www.npmjs.com/package/react-hooks-async/v/2.1.0 fixed!

(it was simply core-js version mismatch...)

@dai-shi dai-shi closed this as completed Apr 16, 2019
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

2 participants