'No native ExponentConstants module found, are you sure the expo-constants's module is linked properly?
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)
Solution 1:[1]
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
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | ackerleytng |