nandorojo / burnt

Crunchy toasts for React Native. 🍞
MIT License
1.16k stars 36 forks source link

Unable to resolve module `expo-modules-core` in bare React Native #4

Closed Nova41 closed 1 year ago

Nova41 commented 1 year ago

Hi, I tried to use this library in a bare React Native (non-expo) project to no avail. I basically did:

Upon launch, a redbox appears, saying

Unable to resolve module expo-modules-core from /Users/myusername/Projects/myproject/node_modules/burnt/build/BurntModule.ios.js: expo-modules-core could not be found within the project or in these directories:
  node_modules/burnt/node_modules
  node_modules
> 1 | import { requireNativeModule } from 'expo-modules-core';
               ^
  2 | // It loads the native module object from the JSI or falls back to
  3 | // the bridge module (from NativeModulesProxy) if the remote debugger is on.
nandorojo commented 1 year ago

Interesting…it’s likely expo-modules-core is a peer dependency then.

Nova41 commented 1 year ago

Hmm, is it possible to use the library without expo-modules-core?

nandorojo commented 1 year ago

I don’t think so, since it’s the only way to use swift + JSI with React Native.

branaust commented 1 year ago

yep. +1

luoxuhai commented 1 year ago

The libray react-native-overlay can be used in bare React Native (non-expo) project.