Nuxt 3.12.1 Update: Prerender Error with app.use Function
Hello everyone! I've recently encountered an issue after updating to Nuxt version 3.12.1. My deployment to Cloudflare Pages fails during the prerendering process with a
SyntaxError: Need to install with \
app.use function
error. This problem did not occur in the previous version (3.11.2), and it only affects the Pull Request Preview Deployment. Here's mynpx nuxi info
for reference:
- Operating System: Windows_NT
- Node Version: v20.8.1
- Nuxt Version: 3.12.1
- CLI Version: 3.12.0
- Nitro Version: 2.9.6
- Package Manager: [email protected]
- User Config: preset, experimental, devtools, modules, serverMiddleware, supabase, i18n, cloudflareAnalytics, turnstile, css, postcss, app, runtimeConfig, routeRules, image, security, content, typescript
- Runtime Modules: @nuxt/[email protected], @nuxt/[email protected], @nuxt/[email protected], @nuxtjs/[email protected], @nuxtjs/[email protected], @nuxtjs/[email protected], @nuxtjs/[email protected], @nuxthq/[email protected], [email protected], [email protected], [email protected], [email protected]
Has anyone else experienced this issue, or does anyone have insights on what might be causing this and how to resolve it? Any help would be greatly appreciated!
Locally when entering the dev mode, the logs have shown different errors on different starts. At first it was the i18n module which seems to create the problem but now its Supabase and due to my usage of Cloudflare Pages and my tests I am really sure that it is because of the upgrade. When I downgrade back everything seems to work fine. Has something changed for configuring the Nuxt Configuration file (nuxt.config.ts
)?5 Replies
This was the initial (500) error:
This is the latest (500) error:
I've seen this brought up a bunch with 3.12.1. I believe this is something being looked into
There's something going on breaking runtime for modules
Oh luckily, I already feared that the configuration should have been more fine-grained and that I had made mistakes that would only stop the startup with the new version, but that reassures me, then it goes back to the old version for now. Thank you very much!
Do you know if there is any issue open for that already?
I'm not sure. I saw Daniel Roe say he was checking into the issue from some comments in another channel
It looks like Daniel identified and has resolved the issue
GitHub
fix(nuxt): use portal to sync nitro/nuxt runtimeConfig + routeRules...
🔗 Linked issue
resolves #27589
📚 Description
As a result of the refactor to runtimeConfig in #27117, it was possible to 'detach' these values if overwriting nuxt.options.runtimeConfig.
This...