W
Wasp2mo ago
NEROX

Could not Fast Refresh ("AuthContext" export is incompatible)

Yesterday updated from 0.16 to 0.18 (latest). Now when recompiling it gives me these alerts: [ Client ] 10:06:48 AM [vite] (client) hmr invalidate /@fs/home/rootall/apps/app/.wasp/out/sdk/wasp/dist/auth/forms/Auth.jsx Could not Fast Refresh ("AuthContext" export is incompatible). Learn more at https://github.com/vitejs/vite-plugin-react/tree/main/packages/plugin-react#consistent-components-exports [ Client ] 10:06:48 AM [vite] (client) hmr update /@fs/home/rootall/app/.wasp/out/sdk/wasp/dist/auth/forms/Login.jsx, /@fs/home/rootall/app/.wasp/out/sdk/wasp/dist/auth/forms/Signup.jsx, /@fs/home/rootall/app/.wasp/out/sdk/wasp/dist/auth/forms/internal/common/LoginSignupForm.jsx It seems that they don't cause any problems when compiling, but why have they started to appear? Is there something I haven't taken into account when migrating?
5 Replies
kapa.ai
kapa.ai2mo ago
Hi @NEROX. 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 several discussions about HMR (Hot Module Replacement) and Fast Refresh issues in Wasp, particularly after version updates. The warnings you're seeing about Fast Refresh and "AuthContext" export incompatibility are related to Vite's HMR system. According to the knowledge sources, there have been issues with how Wasp handles file watching and hot reloads, especially after the restructuring in version 0.12.0. From the Discord discussion about reload issues, users reported similar problems where: - The app rebuilds after every UI change - Full page reloads occur even for simple changes - Vite HMR doesn't always work as expected, causing state loss The Wasp team acknowledged that "this might be a new bug that we maybe introduced with 0.12" and that "the whole app rebuilds when editing a test file." There's also an open GitHub issue investigating file watching that mentions the need to ensure proper rebuild triggers for different parts of the application (server, SDK, and web app). What you can do: 1. These warnings are likely not critical - As you noted, they don't seem to cause compilation problems. They're informational messages from Vite's Fast Refresh system indicating that certain exports can't be hot-reloaded optimally. 2. Check your migration - Ensure you've properly migrated all imports and haven't accidentally imported server-side code on the client, as mentioned in the Discord migration discussion. 3. Report if problematic - If these warnings are causing actual functionality issues (like losing state or excessive reloads), consider reporting it to the Wasp team as it may be a regression in the newer version. The warnings themselves appear to be a known side effect of how Wasp's generated code interacts with Vite's HMR system, and unless they're causing actual problems with your development workflow, they can likely be safely ignored. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @NEROX, 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?
NEROX
NEROXOP2mo ago
@kapa.ai Now when I do some changes, the server stop responding after that alert and it takes up to 1 minute to rebuild
No description
kapa.ai
kapa.ai2mo ago
Let me check the knowledge base for you again. One moment! :books: ---------------------- Based on the knowledge sources, the issue you're experiencing with slow rebuilds (up to 1 minute) after changes is a known problem in Wasp's development workflow. Here's what's happening and what you can try: The Problem According to the Discord discussion about reload issues, users reported that: - The app rebuilds completely after every change, even simple UI changes - This causes disruption to the development workflow - Changes are visible briefly before a full reload occurs The GitHub issue on file watching confirms that after Wasp 0.12.0's restructuring, there are concerns about how file watching and hot reloads work, with the goal being that "the server rebuilds only on changes that affect the server framework code." Additionally, the proxy for dev server issue mentions that "the main server app talks to is killed and restarted all the time → causing our frontend to not be able to access it and resulting in a bunch of Failed to fetch errors." What You Can Try 1. Run wasp clean - As suggested in the Discord support thread, try running wasp clean to clear any cached build artifacts that might be causing issues. 2. Check your system resources - The EC2 instance discussion mentions that "1GB might not be enough in general though, Wasp runs quite a few things at the same time." Ensure your development machine has adequate resources. 3. Report the issue - Since this appears to be a regression after your upgrade from 0.16 to 0.18, and the Wasp team has acknowledged similar issues as potential bugs, consider reporting this with specific details about your setup and the exact changes that trigger the slow rebuild. The slow rebuild time you're experiencing is likely related to these known file watching and HMR issues, and may require fixes from the Wasp team. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @NEROX, 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?
NEROX
NEROXOP2mo ago
it didn't happen before😔
Zuck
Zuck2mo ago
I also get this! just been ignoring it

Did you find this page helpful?