W
Wasp2d ago
criting_

Docker and MacOS

I'm trying to create a Wasp project, but it always fails on the Docker part. I always get the error "❌ --- [Error] Couldn't find docker executable: --------------------------------- To run PostgreSQL dev database, Wasp needs docker installed and in PATH." I am able to run docker commands in the terminal by myself with no issue. I also have Docker added in my PATH. I have no idea why Wasp cannot find the command that I use with no problem. Can anyone help? I'm with latest versions of Node, Docker, and MacOS
11 Replies
kapa.ai
kapa.ai2d ago
Hi @criting_. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- I understand your frustration with the Docker error when trying to run a Wasp project. This is a common issue that several users have encountered. Based on the information provided, even though Docker is installed and working in your terminal, Wasp is unable to detect it. Here are some potential solutions: 1. Make sure Docker Desktop is running: Some users have found that installing Docker Desktop specifically (rather than just the CLI) resolved their issues. If you haven't already, try installing Docker Desktop and ensure it's running before executing Wasp commands. As one community member mentioned: "It was a docker permission problem. It is fixed by installing docker desktop." Discord support thread 2. Alternative approach - connect to an existing database: Instead of using the built-in dev database, you can connect to your own PostgreSQL instance by setting the DATABASE_URL environment variable:
DATABASE_URL=<my-db-url> wasp ...

DATABASE_URL=<my-db-url> wasp ...

You can also add this to a .env.server file in your Wasp project root directory. Connecting to a Database 3. Check your PATH configuration: Even though you mentioned Docker is in your PATH, sometimes there can be issues with how environment variables are loaded in different contexts. Try running Wasp with the full path to Docker explicitly set. 4. Restart your terminal/computer: Sometimes a simple restart can resolve PATH-related issues. If none of these solutions work, it might be helpful to share more details about your specific setup, such as how you installed Docker and Wasp, and any error messages you get when running docker info in the same terminal where you're trying to run Wasp. Let me know if any of these suggestions help resolve your issue! GitHub: Wasp Lang ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speechballoon: ---------------------- Sorry @criting, 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?
criting_
criting_OP2d ago
@kapa.ai I have Docker Desktop installed. I checked and the PATH is working, all docker commands are working when directly used, only WASP cannot find it
kapa.ai
kapa.ai2d ago
Let me check the knowledge base for you again. One moment! :books: ---------------------- I understand your frustration - it's particularly confusing when Docker commands work fine in your terminal but Wasp still can't find Docker. This is a known issue that other users have encountered as well. Since you've confirmed Docker Desktop is installed and running, and Docker commands work directly in your terminal, here are some more specific troubleshooting steps: 1. Try restarting Docker Desktop completely - sometimes the Docker daemon might be in an inconsistent state 2. Check which shell you're using - if you're using a different shell than your default one, the PATH might be configured differently 3. Try deleting the .wasp folder in your project directory and then running the Wasp commands again - this has helped some users with similar issues:
rm -rf .wasp
wasp start db

rm -rf .wasp
wasp start db

4. Verify Docker permissions - some users have reported that even with Docker Desktop installed, there can be permission issues:
docker info

docker info

Check if this runs without any permission errors Discord support thread 5. As a workaround, you can use your own PostgreSQL instance instead of the Docker-based one by setting the DATABASE_URL environment variable If none of these solutions work, it might be worth opening an issue on the Wasp GitHub repository with details about your specific setup, as this seems to be a recurring issue that the Wasp team is aware of but might need more information to fully resolve. Let me know if any of these suggestions help! P.S. The Wasp team has considered improving the error message for Docker-related issues, as mentioned in this GitHub issue, but it's not a simple fix. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speechballoon: ---------------------- Sorry @criting, 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?
criting_
criting_OP2d ago
none of it solved my issue. I restarted my terminal, docker, and my laptop couple of times, and I still get the same error.
Carlos
Carlos2d ago
How did you install your Docker? Also, can you run which docker?
criting_
criting_OP2d ago
I installed it with Docker Desktop from the official website yes, I can run the command "docker: aliased to /Applications/Docker.app/Contents/Resources/bin/docker " @Carlos
Filip
Filip2d ago
Hey @criting_, seems you setup docker as an alias (instead of adding it to the PATH). Scripts and programs don't see aliases, they only see commands from PATH. So, to fix the error, you should do precisely what the error says...
Wasp needs docker installed and in PATH.
... Ensure the docker command is in your path. I seem to remember that Docker desktop previously required you to run it, and it would then ensure the docker command is in your path for you. Have you tried that?
criting_
criting_OP2d ago
I tried it, and I manually tried to it to PATH. After some reading, it seems the issue is being fix when I switched from User to System, and now everything works as expected and the database is started.
No description
MEE6
MEE62d ago
Wohooo @criting_, you just became a Waspeteer level 1!
Filip
Filip2d ago
Ok, great to hear it!
criting_
criting_OP2d ago
thank you!

Did you find this page helpful?