Wasp project fly.io deployment fails, cannot create Prisma?
16 Replies
Hi @skyblade2954. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
I'm sorry to hear that you're having trouble deploying your Wasp project to Fly.io. There could be several reasons why this is happening. Here are a few potential issues and solutions based on the knowledge sources provided:
1. Unique App Name: Ensure that the name of your app is unique across all of Fly.io. If the name is not unique, the deployment will fail. If the app name you've chosen already exists on the Fly.io service, a new, random unique name will be created instead, which can cause the Wasp deploy script to fail. The script should ideally alert you to choose a new, more unique name if the created app name doesn't match the given app name (source (https://github.com/wasp-lang/wasp/issues/1588)).
2. File Path Issues: If you're getting an error that a file or module cannot be found, make sure that you're copying to the correct path. This could be an issue if your folder structure in the deployment environment is different from your local environment (source (https://discord.com/channels/686873244791210014/1223671727943319584)).
3. Organization Specification: If your account is a member of more than one organization on Fly.io, you will need to specify under which one you want to execute the command. To do that, provide an additional
--org <org-slug>
option. You can find out the names(slugs) of your organizations by running fly orgs list
(source (https://wasp-lang.dev/docs/advanced/deployment/cli#deploying)).
4. Error Handling: If an error occurs during the deployment process, it can be difficult to know how to proceed. The Wasp team is aware of this issue and is working on making the deployment script more robust and user-friendly. In the meantime, you might need to manually run some commands or delete resources and start from scratch if an error occurs (source (https://github.com/wasp-lang/wasp/issues/1498)).
If none of these solutions work, please provide more details about the error message you're seeing so we can better assist you.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @skyblade2954, 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?I think it cannot find the prisma folder, but why tho
Did you try deploying for the first time or redeploying an existing app?
Did you provide a custom Dockerfile by some chance?
No, I dont have any prisma folder.
so it cannot find it under my root directory
I believe it is my first deployment.
That's okay, let's first answer the questions above π
But ran several different commands.
I authenticate to fly.io
I added my credit card etc too
I am trying to deploy to spain madrid
Did you run the command like this:
or did you run Fly's CLI directly?
Didn't create a custom dockerfile.
I tried this too: wasp deploy fly launch <app-name> <region>
Ok, so you tried
wasp deploy
and fly
directly?wasp deploy fly launch somecoolapp mad
:~/OpenSaaS/myApp$ wasp deploy fly launch somecoolapp mad
$ flyctl version
flyctl v0.2.72 linux/amd64 Commit: df7529f6da985a662853ffc7003f57ee3c9d8e42 BuildDate: 2024-06-18T23:04:13Z
$ flyctl auth whoami
[email protected]
π Launching your Wasp app to Fly.io!
π You already have Fly toml files. The launch command is intended to be run one time on a new Fly project. Please try a different command.
β --- [Error] Deploy command failed: ---------------------------------------------
Deploy command failed with exit code: 1
That give me this error
so I tried a different method by 1. flyctl auth login 2. flyctl deploy.
Both of those paths fails.
Like I said I tried 2 different method.
1. You can't use
fly
directly, since Wasp needs to do some steps before it. You need to use wasp deploy fly
otherwise it will surely fail if you don't do extra steps.
2. The error above means you already tried deploying and got some TOML file in your root folder
Let's try this:
1. Delete all the apps on Fly you created
2. Delete all the TOML files in your root folder
3. Run wasp deploy fly launch <app-name> <region>
againI will remove all fly.* files and toml files?
Wohooo @skyblade2954, you just became a Waspeteer level 4!
After you successfully deploy - keep the TOML files, but then you use
wasp deploy fly deploy
. It's all written here: https://wasp-lang.dev/docs/advanced/deployment/cliDeploying with the Wasp CLI | Wasp
Wasp CLI can deploy your full-stack application with only a single command.
Yep, any Fly related TOML files
@miho
#2 [internal] load build definition from Dockerfile
#2 transferring dockerfile: 4.20kB 0.2s done
#2 DONE 0.2s
Error: failed to fetch an image or build from source: error building: failed to solve: failed to parse stage name "node:-slim": invalid reference format
π There was an error running "wasp deploy fly deploy". Please review the error and try again (if appropriate).
β --- [Error] Deploy command failed: ---------------------------------------------
Deploy command failed with exit code: 1
passed db section
but got this error
#10 [build 4/7] COPY --link prisma .
#10 ERROR: failed to calculate checksum of ref f494167d-4131-4be9-96c1-424bdb826616::x9ydn2bwhuggd4rpow8e9q283: "/prisma": not found
------
[build 4/7] COPY --link prisma .:------ Error: failed to fetch an image or build from source: error building: failed to solve: failed to compute cache key: failed to calculate checksum of ref f494167d-4131-4be9-96c1-424bdb826616::x9ydn2bwhuggd4rpow8e9q283: "/prisma": not found π There was an error running "wasp deploy fly deploy". Please review the error and try again (if appropriate). β --- [Error] Deploy command failed: --------------------------------------------- Deploy command failed with exit code: 1 Again same error Fak me