11

I'm getting these warnings when I run my expo / jest project and I'm not sure why, seemed to not come up when googled.

console.warn
    The "EXNativeModulesProxy" native module is not exported through NativeModules; verify that expo-modules-core's native code is linked properly

      at Object.<anonymous> (node_modules/expo-modules-core/src/NativeModulesProxy.native.ts:54:11)
      at Object.<anonymous> (node_modules/expo-modules-core/src/index.ts:4:1)

  console.warn
    No native ExponentConstants module found, are you sure the expo-constants's module is linked properly?

      at Object.<anonymous> (node_modules/expo-constants/src/Constants.ts:32:11)
      at Object.<anonymous> (node_modules/expo-asset/src/PlatformUtils.ts:2:1)
ThomasReggi
  • 55,053
  • 85
  • 237
  • 424

3 Answers3

5

I encountered this error in a test (jest), and I had to install jest-expo and change preset in the jest config to mock out expo stuff for jest and fix this.

See details here: https://docs.expo.dev/guides/testing-with-jest/#installation

ackerleytng
  • 416
  • 6
  • 17
1

If you using any Expo library in your project important thing you need is expo and expo-core-modules packages in your package.json file.

For e.g. in my case:

"expo": "^48.0.0",
"expo-modules-core": "^1.2.3"

If package.json not contains these packages install them:

npm install expo expo-modules-core
holesx_x
  • 236
  • 4
  • 4
-1

Faced some issues with iOS build, then resolved by fixing incorrect place of expo_patch_react_imports on Profile.lock. See correct place there (Expo docs).