Some modules not found when build with Expo for web

Hi sisters, bros.,

I need guidance, I develop an app for Android / iOS with managed workflow. I rely on expo 36.x, redux 4.x, redux-persist 5.x, react-navigation 4.x, etc. I build and publish the application in stores and everything is fine.

Now I am asked to extract some components of the React Native app to include them in the existing web version (PHP, Smarty, jQuery, Bootstrap).

My approach is to build the app with Expo for web and, once built, extract the components and integrate them into the other development.

For this, I prepare the development of the React Native app:

  • I install react-dom and react-native-web packages
  • I include the value “web” in the “platforms” key of “expo” in app.json
  • I migrate the .babelrc file to babel.config.js (Babel7 +)

When trying to build:

With … $ expo start -w -c

web Failed to compile.
/Users/XXX/XXX/workspace/XXX/node_modules/react-native-modal-datetime-picker/src/index.js
Module not found: Can’t resolve ‘./DateTimePickerModal’ in ‘/Users/XXX/XXX/workspace/XXX/node_modules/react-native-modal-datetime-picker/src’

With … $ expo build:web

Module not found: Error: Can’t resolve ‘react-native-popup-menu-android’ in ‘/Users/XXX/XXX/workspace/XXX/src/screens’

The truth is that I am a little lost as to what the problem is. Is it because there are packages that are not yet supported? Do I make a technical error? Do I need to take any steps more to adapt the development to Expo for web?

I am very lost, any guidance will help me. Thank you very much in advance.

Greetings,

1 Like

Did you solved? i am stuck in the same problem.

I am having the same issue!

1 Like

i have the issue too with react native datetimepicker i think its an module for ios and android and doesnt work on browser u need to remove this module no way arround

i hope the problem is now resolved!

1 Like

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