Connecting opensaas with Claude Code.
Every time claude code makes some changes, I have to run wasp start again and again to see what changes it actually made. It takes a while and honestly breaks the flow. Is there any better way where changes are instant and I wont have to run wasp db migrate-dev and wasp start 15 times in a day ?
PS : I am a pure vibe coder. Before Ai, I could only code print hello world lol. Be kind
2 Replies
Hi @Sam. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
You're not alone—many Wasp users have experienced similar frustrations with having to restart the dev server or run migration commands frequently, especially when working with OpenSaaS or other Wasp projects.
Hot Reloading in Wasp
Wasp is designed to support hot reloading: when you run
wasp start
, it watches for changes in .wasp
files and files in src/
, and should automatically reflect those changes in the browser without needing to restart the server manually. However, there are some caveats and known issues:
- If you're using WSL2 on Windows and your project is stored on the Windows filesystem (e.g., /mnt/c/
), file change detection often doesn't work. The recommended workaround is to move your project into the Linux filesystem (e.g., somewhere under /home/youruser/
). This should make hot reloading work as expected, and you won't need to restart wasp start
every time you make a change. You can still use your Windows editor to edit files in the Linux filesystem if you want. More details are discussed here: Github Issue #603 and Discord thread.
- Vite HMR (Hot Module Replacement) should work for UI changes. If you notice that the whole app reloads (not just the changed component), or you lose local state, this might be a bug or a side effect of how Wasp currently handles file watching and rebuilding. Several users have reported that even with Vite, the app sometimes does a full reload after a UI change, which can be disruptive. This is a known pain point, and the Wasp team is aware of it, but as of now, there is no official way to "calm down" the reloads or disable them for certain files. See the discussion here: Discord support thread.
Database Migrations
- You only need to run wasp db migrate-dev
when you change your data models (entities) or the database schema. For regular UI or logic changes, this is not required. If you find yourself running it too often, double-check if your changes really require a migration. There is ongoing discussion about making this process smoother, such as warning users when a migration is needed, but currently, you have to run it manually when you change the schema. See: Github Issue #214 and Github Issue #248.
TL;DR: How to Improve Your Flow
1. Move your project to the Linux filesystem if using WSL2. This usually fixes hot reloading issues.
2. You shouldn't need to restart wasp start
for every UI or logic change. If you do, something is likely misconfigured or you're hitting a known bug.
3. Only run wasp db migrate-dev
when you change the database schema. For other changes, it's not needed.
If you still experience issues after moving your project, it may be a bug or a limitation in the current Wasp version. The team is working on improving the developer experience, so keep an eye on updates!
If you want to share your setup or a minimal repo, the community is very helpful and might be able to spot something specific to your case.
Hang in there—you're doing great, and these pain points are common for many new (and even experienced) Wasp users!
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @Sam, 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?Is there any better way where changes are instant and I wont have to run wasp db migrate-dev and wasp start 15 times in a day ?What do you mean where the changes are instant? If you keep
wasp start
running in one terminal it will automatically reload changes. If that's what you are asking about 🙂
Also, you can ask Claude to run wasp compile
to check for errors - this is an internal command that won't open up the browser each time.