Skip to content

Instantly share code, notes, and snippets.

@davidjenner
Last active February 17, 2025 17:20
Show Gist options
  • Save davidjenner/b25e786edb1982f63bc45cf959442a7a to your computer and use it in GitHub Desktop.
Save davidjenner/b25e786edb1982f63bc45cf959442a7a to your computer and use it in GitHub Desktop.
Issues while setting up Wasp OpenSaaS on my M1 Mac with fixes Fab 2025 (Guide for noobs)
Troubleshooting and Fixes encountered on my journey installing the OpenSaaS template on my M1 MacBook Air
Started 17/2/25
Remember to have 'Docker' open!
Tips and findings
- Install Homebrew and node.js - https://brew.sh/ & https://nodejs.org/en
- Make sure you don't miss any steps out in the guide and keep Docker running
- Where to find your OpenAi API Key - https://platform.openai.com/settings/
- I tried option [5] ai-generated for a SaaS idea an all I got was a blank page
- Every new instal create a new instance in 'Docker - Volumes', best delete old ones
(I needed to kill the PID of any proceese described below to delete all Volumes)
- I got this error
"WARNING: It looks like '/Users/david/.local/bin' is not on your PATH! You will not be able to invoke wasp from the terminal by its name."
You can add it to your PATH by adding following line into your profile file (~/.profile or ~/.zshrc or ~/.bash_profile or ~/.bashrc or some other, depending on your configuration):
export PATH=$PATH:/Users/david/.local/bin
To fix the error
https://www.wikihow.com/Show-Hidden-Files-and-Folders-on-a-Mac
To reveal hidden files in Finder, go to Go > Computer > Macintosh HD and press Shift + Command + . (period).
Add the string to the PATH - create a .profile file
https://stackoverflow.com/questions/30461201/how-do-i-edit-path-bash-profile-on-os-x
$ touch ~/.profile; open ~/.profile
.profile
$ export PATH=$PATH:/Users/david/.local/bin' >> ~/.zshrc
source ~/.zshrc
----------
this worked!
nano ~/.zshrc
export PATH=$PATH:/Users/david/.local/bin
Save and exit:
Press Ctrl + X to exit.
Press Y to confirm the changes.
Press Enter to save.
source ~/.zshrc
echo $PATH
----------
Restart the terminal
This this fixed the error :)
- I ran a new project with option [3] I got stuck loading, cancelled it, ran a new one and as the port was previously used, I got this error
"[Error] Port already in use: Wasp can't run PostgreSQL dev database for you since port 5432 is already in use."
I used this - https://medium.com/@prawitohudoro/mastering-mac-terminal-how-to-terminate-processes-on-specific-ports-d54bc8401564#:~:text=Replace%20%3Cport%3E%20with%20the%20actual%20port%20number%20you%27re,listed%20in%20the%20second%20column%20of%20the%20output.
1 - sudo lsof -i :<port>
2 - Get the PID
3 - kill <PID>
Then when running 'wasp db start' I got this error
docker: Cannot connect to the Docker daemon at unix:///Users/davidjenner/.docker/run/docker.sock. Is the docker daemon running?.
Error/fix - Docker stoppped running in the background - Re-open and then re-run 'wasp db start'
I'm running a new app and it's stuck loading at this point in the command line
2025-02-17 13:28:05.050 UTC [62] LOG: checkpoint complete: wrote 45 buffers (0.3%); 0 WAL file(s) added, 0 removed, 0 recycled; write=4.361 s, sync=0.006 s, total=4.381 s; sync files=12, longest=0.004 s, average=0.001 s; distance=261 kB, estimate=261 kB; lsn=0/19534E8, redo lsn=0/19534B0
What I tried to fix the error
- I killed the instances in the active ports
- Deleted the Volumes in Docker
- Restarted my MacBook
- I gave up 1st time and reinstalled MacOS - that fixed it
I had similar error again 2nd time
- I quit the session in Terminal
- cd'd back into the directory
- entered 'wasp start db' and worked!
Basics on pusing to your own repo
Once loaded, open it up in Visual Studio Code
Install the Gitlab (or Github) extention
In the terminal, make sure you have your "user.name" and "user.email" setup - https://stackoverflow.com/questions/54876421/make-sure-you-configure-your-user-email-and-user-name-in-git-when-trying-t
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
Apple Sillicon Apple / MacOS
Installing Docker
Malware error with docker - Malware Blocked. “com.docker.vmnetd” was not opened because it contains malware. This action did not harm your Mac.
Read the fix here - https://github.com/docker/for-mac/issues/7527
Basically, install from here - https://docs.docker.com/desktop/setup/install/mac-install/
Adding the OpenAI API Key to the Terminal
This fixed the issue - https://www.immersivelimit.com/tutorials/adding-your-openai-api-key-to-system-environment-variables#:~:text=Create%20a%20new%20variable%20called%20OPENAI_API_KEY%20and%20set,editor%20Add%20a%20new%20line%20to%20the%20file%3A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment