After update to ^0.18 from time to time it breaks hot reload for server
Hello, from time to time after recent migration from 0.17 to 0.18.1 it breaks hot reload for server. I'm getting this warn
Anyone was able to solve this issue yet?
3 Replies
Hi @Sahee. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Based on the knowledge sources provided, I can see that there are known issues with hot reloading and file watching in Wasp, particularly after version 0.12.0 and the restructuring changes.
Your issue appears to be related to Vite's Hot Module Replacement (HMR) having trouble with the
AuthContext export from the SDK. The warning message indicates that Fast Refresh cannot be applied because the export is incompatible.
According to the knowledge sources, there's an open issue investigating how file watching works after the restructuring. The issue mentions that the team needs to investigate the impact on watching procedures and hot reloads, with goals including:
- The server rebuilds only on changes that affect the server framework code
- The SDK rebuilds only on changes that affect the SDK code
- The web app rebuilds only on changes that affect the web-app framework code
Additionally, there's a related Discord discussion where users reported similar issues with unnecessary reloads after UI changes, and the team acknowledged this as a file watching error.
Unfortunately, the knowledge sources don't provide a specific solution for your exact issue with the AuthContext export incompatibility in version 0.18.1. The team appears to be aware of file watching and hot reload issues but hasn't documented a fix for this particular problem yet.
Potential workarounds (based on general patterns in the knowledge sources):
- Try refreshing your browser when this occurs
- If the issue persists, you may need to restart wasp start
I recommend reporting this specific issue to the Wasp team on their GitHub repository or Discord, as it appears to be a regression or new issue with version 0.18.1 that isn't fully documented in the available knowledge sources.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @Sahee, 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?Hi @Sahee! Thanks for bringing up this issue, it's quite straightforward to fix, so we'll schedule it soon. Meanwhile, it shouldn't have a big impact on your workflow, as the page will just refresh, right? You can follow this issue to get notified about when we fix it.
GitHub
auth/forms/Auth.tsx exports are incompatible with React Fast Refr...When Vite needs to do Hot Module Replacement on auth/forms/Auth.tsx in the SDK, it fails with the following error: [ Client ] 3:48:50 PM [vite] (client) hmr invalidate /@fs/home/x/dev/app/.wasp/out...
also get this, following