Expo Webpack error: Module not found: Can't resolve 'Dimensions' in ...


Hi, I have built expo react-native project. Now I want to run my project on web. I have followed instructions mentioned on Expo website. However, I got error above and I cannot find answer. Please help!!!

Hey @guvanch,

Can you share the code that’s throwing this error?

Cheers,
Adam

Hi @adamjnav. My project is big and I cannot show everything. Actually this is working on both IOS and Android but when I run on browser, It throws error above about Dimensions

Hi

Do you reference Dimensions in your code? If so, could you paste that part of the code?

The following works for me in the browser and on Android. I haven’t tested it on iOS:

I can also create a new project with expo init, copy the code from App.js from the snack to the new project and it still works in both a web browser and on Android and I can successfully run expo build:web.

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.