Skip to content
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

bug: Prisma client doesn't work on Globe #54

Open
1 task done
indratrisnar opened this issue Feb 29, 2024 · 5 comments
Open
1 task done

bug: Prisma client doesn't work on Globe #54

indratrisnar opened this issue Feb 29, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@indratrisnar
Copy link

Is there an existing issue for this?

  • I have searched the existing issues.

CLI Version

0.0.9+1

Project ID

72440fcd-a637-4df4-a746-c3a388a56651

Description

i re-deploy after update Globe CLI to 0.0.9+1. success.
then, when i tried access api. some api return Internal Server Error.

i have connection to Prisma ORM (mysql) inside my app. if Prisma ORM cause this error.

how to integrated/install Prisma ORM and mysql to Globe?

Steps to reproduce

  1. update Globe CLI
  2. deploy production
  3. test api, some work and some return Internal Server Error

Expected behavior

return data

Screenshots

success deploy:
image

work api:
image

not work api:
image

Additional context and comments

No response

@indratrisnar indratrisnar added the bug Something isn't working label Feb 29, 2024
@lesnitsky
Copy link
Member

I can see a few issues in your deployment logs:

2024-02-29T11:25:36.534141Z [dotenv] Load failed: file not found: File: '.env'
2024-02-29T11:25:36.535465Z [ERROR] 2024-02-29 11:25:36.531538 0:00:00.000958 GET /notes
2024-02-29T11:25:36.535598Z ERROR - 2024-02-29 11:25:36.533394

You need to set env vars on the dashboard instead of trying to read .env:

  • Go to your project
  • Settings
  • Environment variables

2024-02-29T11:25:36.539975Z PrismaInitializationException: Cannot find the query engine binary (Basename: C:\Users\Indra\node_modules\prisma\query-engine-windows.exe | prisma-query-engine)
2024-02-29T11:25:36.539986Z package:orm/binary_engine.dart 85 BinaryEngine.resolvedExecutable
2024-02-29T11:25:36.540707Z Error thrown by handler.
2024-02-29T11:25:36.540789Z package:orm/binary_engine.dart 191 BinaryEngine._createProcess
2024-02-29T11:25:36.542726Z package:orm/binary_engine.dart 156 BinaryEngine.start
2024-02-29T11:25:36.543209Z PrismaInitializationException: Cannot find the query engine binary (Basename: C:\Users\Indra\node_modules\prisma\query-engine-windows.exe | prisma-query-engine)
2024-02-29T11:25:36.543219Z package:orm/binary_engine.dart 85 BinaryEngine.resolvedExecutable
2024-02-29T11:25:36.544087Z package:orm/binary_engine.dart 191 BinaryEngine._createProcess
2024-02-29T11:25:36.547038Z package:orm/binary_engine.dart 156 BinaryEngine.start

C:\Users\Indra\node_modules\prisma\query-engine-windows.exe
This path only exists on your machine. I'm not sure if that's a consequence of invalid env vars, but it is definitely something that is causing the failure.

@indratrisnar
Copy link
Author

indratrisnar commented Feb 29, 2024 via email

@lesnitsky
Copy link
Member

After additional digging into how Prisma ORM works, we are coming to the conclusion that it won't work on Globe, since it has a dependency on node and npm, which are unavailable in our environment.

@lesnitsky lesnitsky changed the title bug: some api occured Internal Server Error bug: Prisma client doesn't work on Globe Feb 29, 2024
@indratrisnar
Copy link
Author

i have checked into the dashboard settings. but, the env I need is already there.

I forgot, whether it was made by me before or automatically.
because when I first linked the project to globe. I allow env upload.

image

@indratrisnar
Copy link
Author

After additional digging into how Prisma ORM works, we are coming to the conclusion that it won't work on Globe, since it has a dependency on node and npm, which are unavailable in our environment.

ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants