Fly.io deployment syntax error
I got the following error while deploying on Fly.io in the server logs. There is no syntax error when starting the server locally.
8 Replies
Hi @Vjeks. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
The error message you're seeing indicates that the
Prisma
export is not found in the @prisma/client
module. This could be due to a number of reasons, such as a version mismatch or incorrect import statement.
From the knowledge sources, there have been issues with Prisma version compatibility in Wasp before (source (https://github.com/wasp-lang/wasp/issues/158)). It's possible that you might be using a version of Prisma that doesn't have the Prisma
export, or the way you're importing it is incorrect.
You might want to check the version of Prisma you're using and ensure it's compatible with your version of Wasp. If you're unsure, you could try updating Prisma to the latest version or the version that Wasp officially supports.
If the issue persists, it would be helpful to see the exact code where you're importing Prisma
from @prisma/client
. There might be a typo or incorrect syntax in the import statement.
If you're still having trouble, I recommend reaching out to the Wasp community on their Discord server (https://discord.com/channels/686873244791210014) or opening an issue on the Wasp GitHub repository (https://github.com/wasp-lang/wasp/issues).
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @Vjeks, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist:
Perhaps try again in 15mins?It isn't my code, but rather generated by wasp in the file ".wasp/out/sdk/wasp/auth/utils.ts"
and it looks like this:
That's really strange, it means that somehow the Prisma client wasn't generated successfully. Please check the server logs for any signs of failed migrations or DB errors 🤔
Created an issue: https://github.com/wasp-lang/wasp/issues/2312
I don't think there was any errors while deploying the server. And the following are all the server logs in 1 restart:
Gib zip
@miho Feel free to investigate this if you have the time.
If not, I'll pick it up next week after launching the SDK.
My next hunch would be failed migrations. The way we can check this is by connecting to the production DB directly and using some tool to view the
_prisma_migrations
table. Failed migrations usually have some log next to them.
@kapa.ai how to connect to a Fly database via CLI and list of the contents of my _prisma_migrations
table. Also, how do I check the list of available DBs and connect to the one I want.Let me check the knowledge base for you. One moment! :books:
----------------------
To connect to your Fly database and interact with it, you can use the Fly CLI. Here are the steps:
1. Connect to the PSQL tool that Postgres uses to give commands to the DB using the Fly CLI:
2. To view a list of available databases, write:
3. To connect to your desired database, run:
4. To see the list of DB tables, execute the following:
5. To view the contents of your
_prisma_migrations
table, you can run:
Please replace <your-db-name>
and <database-name>
with your actual database names.
These steps were discussed in a Discord support thread (https://discord.com/channels/686873244791210014/1217295340785635418) about running database migrations on a hosted app.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @miho, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist:
Perhaps try again in 15mins?