Unable to resolve "../Utilities/Platform" from "node_modules/react-native/Libraries/ReactPrivate/ReactNativePrivateInterface.js"

Please provide the following:

  1. SDK Version: 48
  2. Platforms(Android/iOS/web/all): web
  3. Add the appropriate “Tag” based on what Expo library you have a question on.

Issue valid for Hermes and jsc

My code is perfecty working on expo 48 on IOS.

But when running it for the web I have this error message:

Unable to resolve “…/Utilities/Platform” from “node_modules/react-native/Libraries/ReactPrivate/ReactNativePrivateInterface.js”

While debuging it comes from react-native-maps. When I comment the relevant section, I can launch a web page.
I don’t understand why it is loaded since I prevent this part of the code being loaded with const isMobile = Platform.OS === 'web' ? false : true;

Having said that while looking in node_modules/react-native/Libraries/ReactPrivate/ReactNativePrivateInterface.js Platform is called : import typeof Platform from '../Utilities/Platform';

but ../Utilities/Platform does not exist.
Error is removed when installing react-native-web@0.19.4 which is not recommended as expo is expecting react-native-web@~0.18.10 according to npx

but then I face a new error:


Web Bundling failed 8121ms
Unable to resolve "react-native-web/dist/exports/DrawerLayoutAndroid" from "node_modules/react-native-gesture-handler/lib/module/components/GestureComponents.web.js"

So something is going-on with react-native-web …

Please help :frowning:

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