oliviertassinari / react-swipeable-views

A React component for swipeable views. :snowflake:
https://react-swipeable-views.com/
MIT License
4.46k stars 480 forks source link

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

Open Thoralf-I opened 3 years ago

Thoralf-I commented 3 years ago

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 commented 3 years ago

Could this be related with #640?

Thoralf-I commented 3 years ago

Great, thanks!

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

pgrodrigues commented 3 years ago

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