Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

jestjs

expo

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)
like image 968
ThomasReggi Avatar asked Jan 29 '26 15:01

ThomasReggi


1 Answers

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

like image 89
ackerleytng Avatar answered Feb 02 '26 10:02

ackerleytng