Wasp project fly.io deployment fails, cannot create Prisma?

16 Replies
kapa.ai
kapa.aiβ€’4mo ago
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?
skyblade2954
skyblade2954β€’4mo ago
I think it cannot find the prisma folder, but why tho
miho
mihoβ€’4mo ago
Did you try deploying for the first time or redeploying an existing app? Did you provide a custom Dockerfile by some chance?
skyblade2954
skyblade2954β€’4mo ago
No, I dont have any prisma folder. so it cannot find it under my root directory I believe it is my first deployment.
miho
mihoβ€’4mo ago
That's okay, let's first answer the questions above πŸ˜„
skyblade2954
skyblade2954β€’4mo ago
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
miho
mihoβ€’4mo ago
Did you run the command like this:
wasp deploy fly launch <app-name> <region>
wasp deploy fly launch <app-name> <region>
or did you run Fly's CLI directly?
skyblade2954
skyblade2954β€’4mo ago
Didn't create a custom dockerfile. I tried this too: wasp deploy fly launch <app-name> <region>
miho
mihoβ€’4mo ago
Ok, so you tried wasp deploy and fly directly?
skyblade2954
skyblade2954β€’4mo ago
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.
miho
mihoβ€’4mo ago
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> again
skyblade2954
skyblade2954β€’4mo ago
I will remove all fly.* files and toml files?
MEE6
MEE6β€’4mo ago
Wohooo @skyblade2954, you just became a Waspeteer level 4!
miho
mihoβ€’4mo ago
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/cli
Deploying with the Wasp CLI | Wasp
Wasp CLI can deploy your full-stack application with only a single command.
miho
mihoβ€’4mo ago
Yep, any Fly related TOML files
skyblade2954
skyblade2954β€’4mo ago
@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
Want results from more Discord servers?
Add your server