W
Waspā€¢6mo ago
skyblade2954

"Wasp deploy fly launch" command cannot find prisma in root folder?

wasp deploy fly launch mycoolapp mad
38 Replies
kapa.ai
kapa.aiā€¢6mo 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: ---------------------- It seems like you're encountering an issue where the wasp deploy fly launch command is not able to find Prisma in the root folder. This could be due to a package.json file present in a directory above your Wasp project. If this package.json file has Prisma as a dependency, it might cause unexpected results or errors. One of the reported issues on the Wasp Github page suggests that if there is a package.json file above the Wasp project, the Prisma version from it will be used. This can lead to errors if the Prisma version in the package.json file is different from the one required by your Wasp project. A potential solution to this problem is to move your Wasp project directory somewhere else where there is no package.json file in any of the parent directories. Another solution is to remove the package.json and package-lock.json files from the parent directory if they are not needed. Here is the relevant discussion on this issue: Github Issue #787 (https://github.com/wasp-lang/wasp/issues/787) Please note that these are potential solutions based on similar issues faced by other users and might not directly apply to your specific situation. If the problem persists, I would recommend reaching out to the Wasp community or support for more specific guidance. ---------------------- 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
skyblade2954OPā€¢6mo ago
@kapa.ai there is no package.json in parent folders. However my dockerfile cannot find a prisma folder inside root directory.
kapa.ai
kapa.aiā€¢6mo ago
Let me check the knowledge base for you. One moment! :books: ---------------------- If your Dockerfile cannot find the Prisma folder inside the root directory, it might be due to the way your Dockerfile is set up or how your project is structured. In one of the issues on the Wasp Github page, a user encountered a similar problem where the Dockerfile was not able to find the db/schema.prisma file. The Dockerfile was trying to copy this file into the db directory in the Docker container, but it was failing because the file was not found. Here is the relevant discussion on this issue: Github Issue #572 (https://github.com/wasp-lang/wasp/issues/572) If you have renamed your db folder to prisma, you might need to update your Dockerfile to reflect this change. For example, if you have a line in your Dockerfile like this:
COPY db/schema.prisma ./db/
COPY db/schema.prisma ./db/
You might need to change it to this:
COPY prisma/schema.prisma ./prisma/
COPY prisma/schema.prisma ./prisma/
This will ensure that the Dockerfile is looking for the schema.prisma file in the correct directory. If you're still having trouble, it might be helpful to reach out to the Wasp community or support for more specific guidance. ---------------------- 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
skyblade2954OPā€¢6mo ago
I don't have prisma or db folder inside my root. what's wrong with it. Please help me anyone, I don't have any document about this, like I run a simple command, but probably something required for this. what is it that required?
miho
mihoā€¢6mo ago
Kapa can lead you down the wrong path here, don't listen to it. Let's try to solve this with couple of basic checks: 1. Did you delete all existing Fly app from the previous attempts? I mean, the app builders as well. Fly can have weird caching issues sometimes. 2. Did you delete the TOML files from the previous attempts? 3. Did you just run this command that you wrote in the original question?
skyblade2954
skyblade2954OPā€¢6mo ago
Ok, @miho I deleted everything, you asked. Let me tell you how I did. I deleted fly-client.toml and fly-server.toml. I ran: fly apps destroy mycoolapp-server, fly apps destroy mycoolapp-client, fly apps destroy mycoolapp-db I ran: wasp deploy fly launch mycoolapp mad Somehow, my dockerfile cannot find ./prisma folder, I don't know where should it find. I don't have any folder called prisma
skyblade2954
skyblade2954OPā€¢6mo ago
No description
miho
mihoā€¢6mo ago
In your build log it mentions #3 [internal] load metadata for docker.io/library/node:18.20.3-slim We don't use that image to build the server, we use FROM node:18.18.0-alpine3.17 AS node This means that there is still something cached from your previous attempts on Fly. Which is really annoying. Did you delete the App builders as well?
skyblade2954
skyblade2954OPā€¢6mo ago
How to delete app builders? Could you please give me the commands?
miho
mihoā€¢6mo ago
I just go here: https://fly.io/dashboard/<username>/builders
skyblade2954
skyblade2954OPā€¢6mo ago
I have one app down there I am trying to delete it.
miho
mihoā€¢6mo ago
If that doesn't work out, another option we could try to avoid their remote builders is to run:
wasp deploy fly launch <app> <region> --build-locally
wasp deploy fly launch <app> <region> --build-locally
skyblade2954
skyblade2954OPā€¢6mo ago
But there is no delete button, wth gui How do you delete the builder? @miho
miho
mihoā€¢6mo ago
Please don't tag me after 4 minutes šŸ˜„
skyblade2954
skyblade2954OPā€¢6mo ago
Ok. It was in settings. God Damn it. I wish I can solve this problem @kapa.ai
kapa.ai
kapa.aiā€¢6mo ago
Let me check the knowledge base for you. One moment! :books: ---------------------- I understand that you're facing a challenge with your Dockerfile not finding the Prisma folder in the root directory. Here are a few steps you can take to troubleshoot this issue: 1. Check your Dockerfile: Ensure that the paths specified in your Dockerfile match the actual structure of your project. If you've renamed or moved directories, your Dockerfile needs to reflect these changes. 2. Check your .dockerignore file: If you have a .dockerignore file in your project, make sure it's not excluding the Prisma folder or any other necessary files or directories. 3. Rebuild your Docker image: If you've made changes to your project structure or Dockerfile, you'll need to rebuild your Docker image to apply these changes. 4. Check your project's dependencies: Make sure that Prisma is correctly installed and listed as a dependency in your project's package.json file. If you're still having trouble, it might be helpful to reach out to the Wasp community or support for more specific guidance. They might be able to provide more insight into what's causing this issue and how to resolve it. ---------------------- 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
skyblade2954OPā€¢6mo ago
@miho I asked in that general chat to check someone else root directory. I think I am making a simple error.
miho
mihoā€¢6mo ago
Maybe the next thing for you could be: moving your app to a different folder on disk (I know it sounds weird) but maybe that's how the Fly tool caches your build.
skyblade2954
skyblade2954OPā€¢6mo ago
It is really hard to debug, when there is no online information. I tried to ask it on fly.io community, however my topics removed directly as spam.
miho
mihoā€¢6mo ago
Another thing you can try besides deleting the app builder is using the local build to avoid Fly's remote caches:
wasp deploy fly launch <app> <region> --build-locally
wasp deploy fly launch <app> <region> --build-locally
skyblade2954
skyblade2954OPā€¢6mo ago
I tried locally too. Could you please send me your root directory, when you run that command? Do you have a prisma folder?
miho
mihoā€¢6mo ago
Nope šŸ˜„ no Prisma folder Let me record a short video for you
skyblade2954
skyblade2954OPā€¢6mo ago
So the location of the Dockerfile might be in wrong place I ran this command inside my root wasp folder
skyblade2954
skyblade2954OPā€¢6mo ago
No description
skyblade2954
skyblade2954OPā€¢6mo ago
My app is the root folder.
miho
mihoā€¢6mo ago
Why do you have a Dockerfile in your app root folder? Did you want to customize the build step?
skyblade2954
skyblade2954OPā€¢6mo ago
I don't know.
miho
mihoā€¢6mo ago
If not, delete it, since Wasp has its own by default which works well.
skyblade2954
skyblade2954OPā€¢6mo ago
I didn't create the dockerfile.
miho
mihoā€¢6mo ago
Delete it šŸ˜„ maybe it's a leftover from your previous attempts where you ran fly directly
skyblade2954
skyblade2954OPā€¢6mo ago
Is there anything else look suspicious?
miho
mihoā€¢6mo ago
That's the main thing šŸ˜„ if you put a Dockerfile in your root dir, Wasp will use it. This explains the weird logs I mentioned earlier: https://ptb.discord.com/channels/686873244791210014/1258693942845898804/1258700880371253278 1. Let's delete Dockerfile 2. Delete TOML files 3. Delete existing apps on Fly 4. And let's try again šŸ˜„
skyblade2954
skyblade2954OPā€¢6mo ago
I did all now Is it related with postgres or something? that dockerfile? So strange.
miho
mihoā€¢6mo ago
Wasp projects don't have a Dockerfile , so I don't know how you ended up with one.
skyblade2954
skyblade2954OPā€¢6mo ago
wow nice. šŸ˜„
miho
mihoā€¢6mo ago
As I said:
maybe it's a leftover from your previous attempts where you ran fly directly
Maybe Fly put it there šŸ˜„
skyblade2954
skyblade2954OPā€¢6mo ago
I could be able to build it It didn't give any error I will check whether it gives me a url Yes, found the URL everything seems working somehow. https://mycoolapp-client.fly.dev/
miho
mihoā€¢6mo ago
I'm glad it worked out for you! šŸ˜Š It seems that the Dockerfile was causing the issue.
Want results from more Discord servers?
Add your server