shows blank page after integrating rolldown

why my nuxt 4 shows blank page in dev serve pnpm dev but working fine in production serve pnpm generate?
3 Replies
kapa.ai
kapa.ai2mo ago
Hi @Zhaolin Lau. 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, there appears to be a known issue with Nuxt 4.1.3 that can cause blank pages or indefinite loading in development mode. This issue is related to the @nuxt/cli version and may be connected to rolldown integration. The Issue Several users reported that after updating to Nuxt 4.1.3, the browser keeps loading indefinitely with requests remaining in a "pending" state. This particularly affects development mode while production builds work fine. Solutions 1. Update @nuxt/cli The issue was resolved in @nuxt/cli v3.29.1. Try refreshing your lockfile:
# Delete node_modules and lockfile
rm -rf node_modules pnpm-lock.yaml
# Reinstall dependencies
pnpm install
# Delete node_modules and lockfile
rm -rf node_modules pnpm-lock.yaml
# Reinstall dependencies
pnpm install
2. Temporary Workaround (if update doesn't work) If the problem persists, you can override the CLI version to 3.28.0 in your package.json:
"pnpm": {
"overrides": {
"@nuxt/cli": "3.28.0"
}
}
"pnpm": {
"overrides": {
"@nuxt/cli": "3.28.0"
}
}
3. Check for Environment Variables The issue may be related to environment variables. If you're using a .env file or passing environment variables via the command line, try temporarily removing them to see if that resolves the issue. 4. Rolldown-specific Issue If you're specifically using rolldown-vite, there was a fix for the replacement plugin where the preventAssignment option wasn't being passed, which could cause issues loading the app in development. Try these solutions in order, and make sure you're running the latest patch version of Nuxt 4.1.x with updated dependencies. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai2mo ago
<@520675622830342144> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
Zhaolin Lau
Zhaolin LauOP2mo ago
Still not working

Did you find this page helpful?