-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prisma Integration Errors in React Native with Expo: Warnings and Import Failures #16
Comments
Issue seems to be related to NativeModules returning an empty object. Trying to reference to react-native-prisma/src/index.ts Lines 19 to 25 in 9fce361
|
Thank you for reporting this Nabil. To help me narrow this down, can you confirm that you are doing the following:
Prisma relies on a native module, so Expo Go isn't supported at the moment. |
I'm facing same issue. I've tried all steps above, but prisma failed to initialize |
…rrors Show a few common error resolutions when the native module fails to initialize for any reason. Partially resolves prisma#16.
…rors Show a few common resolutions when the native module fails to initialize for any reason. Partially resolves prisma#16.
…rors Show a few common resolutions when the native module fails to initialize for any reason. Partially resolves prisma#16.
…rors Show a few common resolutions when the native module fails to initialize for any reason. Partially resolves prisma#16.
Thanks @Skr1pt1k. Now, I'm wondering what's special about your setup. Would you be able to invite me to a repo or create a minimal reproduction I can debug? |
I was able to recreate this issue and even solve it I don't know why but when you define the sceham.prisma in some ./**/ directory the prisma is not able to initialize or sometimes access the database same goes for many other issues created on this repo. I was even able to solve it by creating the schema.prisma in the ROOT_DIR of the project which then allows PrismaClient to work perfectly as expected. Other issues which I faced was
|
Also having this issue. Interesting is that I don't have the issue with the example project https://github.com/sorenbs/budget-buddy-expo. I tried installing the same version of all prisma dependencies in the package.json from that project and mirroring configuration as closely as possible, but I still can't get rid of the error in my own project... Edit: also working in a new project created with create-expo-app |
I figuerd out for me the problem was
PS: Make sure to run EDIT: I still receive the error in the console sometimes when reloading, however afterward it initializes fine, applies the migrations without problems and runs all queries. Maybe try if it works for you too |
What version of prisma, @prisma/client and @prisma/react-native are you using |
The issue also persists for me, even when I run the base project from @sorenbs : https://github.com/sorenbs/budget-buddy-expo with all the prerequisites steps mentioned above. Any potential fixes? |
Estou com mesmo problema.... "@prisma/client": "^5.22.0",
|
Description
When following documentation for in README.md according to the Expo Section I get various warinings/errors in different scenarios.
PrismaClient
instance anywhere in the application gives this warningimport '@prisma/react-native';
anywhere in the application throws this errorExpected Behavior
When following the guidelines outlined in the README.md under the Expo Section, users should be able to integrate Prisma seamlessly into their React Native projects using Expo without encountering warnings or errors mentioned.
Additional Information
The issues described above were observed not only when using the Expo Go app for live testing and development but also during local builds of the application. This was done to ensure that the problems were consistent across different testing environments provided by Expo. Despite trying various configurations and setups in both Expo Go and local builds, the same warnings and errors persisted.
The text was updated successfully, but these errors were encountered: