wasp start for first app
I built my first saas based wasp app per the instructions, ran it with wasp start and it displayed an error at the end (but the app seems to be up). The following was displayed at the end. Why is this happening?
[ Server ] Starting pg-boss... [ Server ] pg-boss started! [ Server!] Port 3001 is already in use [ Server ] [nodemon] app crashed - waiting for file changes before starting...And port 3001 is available when the wasp app isn't running, and open when the app is running: Running:
$ netstat -lntu | grep 3001 tcp 0 0 0.0.0.0:3001 0.0.0.0:* LISTENMy environment is Ubuntu 22.04.
3 Replies
Hi @rambo298. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
It looks like you're experiencing a port conflict issue with your Wasp app. This is a known issue that can happen with Wasp applications during development.
The error message indicates that port 3001 (which Wasp uses for the server/backend) is already in use, but interestingly your netstat command shows that the port is only in use when your app is running. This suggests that there might be an internal conflict within the Wasp application itself.
Here's what's likely happening:
When you run
3. Restart your computer (as a last resort) This is a known issue in Wasp that has been reported by other users. The Wasp team is aware of it and has an open issue to make port selection more flexible: Make it easy to use different ports during Wasp development. If your app is still functioning despite the error message, you might be able to continue development without immediate fixes. The "[nodemon] app crashed - waiting for file changes before starting..." message indicates that the server is in a watching state, ready to restart when you make changes. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @rambo298, 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?
wasp start
, Wasp tries to start both the client (frontend, typically on port 3000) and server (backend, typically on port 3001). In your case, it seems that something in the Wasp process is already binding to port 3001 before the main server process tries to use it, causing the conflict.
Here are some potential solutions:
1. Clean and restart your app:
2. Kill any processes using the ports and restart:
3. Restart your computer (as a last resort) This is a known issue in Wasp that has been reported by other users. The Wasp team is aware of it and has an open issue to make port selection more flexible: Make it easy to use different ports during Wasp development. If your app is still functioning despite the error message, you might be able to continue development without immediate fixes. The "[nodemon] app crashed - waiting for file changes before starting..." message indicates that the server is in a watching state, ready to restart when you make changes. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @rambo298, 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?
wasp clean
wasp start
produces the same error
What does Vite report? Do you have anything running on port 3000?