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

With Webpack failed to compile: Module not found: Error: Can't resolve 'react' #641

Open
1 task done
Thoralf-I opened this issue Mar 7, 2021 · 3 comments
Open
1 task done

Comments

@Thoralf-I
Copy link

Thoralf-I commented Mar 7, 2021

  • I have searched the issues of this repository and believe that this is not a duplicate.

Hi,

I am trying to compile my project with webpack and react-swipeable-views. However, compiling fails with error "Module not found: Error: Can't resolve 'react'.". The problem is that webpack can't resole react in react-swipeable-views-core. React is installed and works fine. I am using yarn 2/Berry with workspaces.

Your Environment

Tech Version
react-swipeable-views ^0.13.9
React 17.0.1
platform Windows
typescript 4.0.3
webpack ^5.24.2

Do you know what I am doing wrong?

Thanks!

@pgrodrigues
Copy link
Contributor

Could this be related with #640?

@Thoralf-I
Copy link
Author

Great, thanks!

Adding "react-swipeable-views/**/react": ">=15.3.0" to resolutions made the trick.

@pgrodrigues
Copy link
Contributor

This issue can be closed as it should no longer happen in v0.14.0 due to #640.

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