"Wasp deploy fly launch" command cannot find prisma in root folder?
wasp deploy fly launch mycoolapp mad
38 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:
----------------------
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?@kapa.ai there is no package.json in parent folders. However my dockerfile cannot find a prisma folder inside root directory.
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:
You might need to change it to this:
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?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?
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?
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
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?How to delete app builders?
Could you please give me the commands?
I have one app down there
I am trying to delete it.
If that doesn't work out, another option we could try to avoid their remote builders is to run:
But there is no delete button, wth gui
How do you delete the builder?
@miho
Please don't tag me after 4 minutes š
Ok.
It was in settings. God Damn it.
I wish I can solve this problem @kapa.ai
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?@miho I asked in that general chat to check someone else root directory. I think I am making a simple error.
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.
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.
Another thing you can try besides deleting the app builder is using the local build to avoid Fly's remote caches:
I tried locally too.
Could you please send me your root directory, when you run that command?
Do you have a prisma folder?
Nope š no Prisma folder
Let me record a short video for you
So the location of the Dockerfile might be in wrong place
I ran this command inside my root wasp folder
My app is the root folder.
Why do you have a
Dockerfile
in your app root folder? Did you want to customize the build step?I don't know.
If not, delete it, since Wasp has its own by default which works well.
I didn't create the dockerfile.
Delete it š maybe it's a leftover from your previous attempts where you ran
fly
directlyIs there anything else look suspicious?
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 šI did all now
Is it related with postgres or something?
that dockerfile?
So strange.
Wasp projects don't have a
Dockerfile
, so I don't know how you ended up with one.wow nice.
š
As I said:
maybe it's a leftover from your previous attempts where you ran fly directlyMaybe Fly put it there š
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/
I'm glad it worked out for you! š It seems that the Dockerfile was causing the issue.