New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Undefined route in Nuxt layout component in prod build #15434
Comments
Would you provide a reproduction? 🙏 |
Unfortunately, it's part of a commercial project. |
This comment was marked as off-topic.
This comment was marked as off-topic.
I'm not asking for your full app, just a minimal reproduction of the issue via https://stackblitz.com/github/nuxt/starter/tree/v3-stackblitz. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
|
|
Would you try upgrading your version of vue-router to 4.1.6 manually? |
@danielroe Confirmed that upgrading to |
I am on v4.1.6 since it was released and yet I still face this error on Nuxt edge. |
@dargmuesli Any chance of a reproduction? 🙏 (The only example I have so far is using 4.1.5.) |
Oh well, I spent way too many hours deep inside code just to find out I had to update my |
Does it really work? |
For me |
Please do provide a reproduction if that's the case. This is an upstream issue (not directly caused by Nuxt) but if there's anything I can do to help resolve this, I will. |
Make sure all your other dependencies are up to date as well, @misaon. |
What I did is to resolve this issue is, I deleted my
|
Upgrade to RC-14 solved this issue 🙏 |
I didn't encounter this issue until upgrading from rc-12 to 1.0.0. In dev and in local build it works fine, but as soon as it is deployed to Netlify I'm hit with the error Looking at @danielroe Any ideas? Could it have something to do with the fact that this project only uses one template, ie the Have had to revert to rc-12 in the meantime until resolved. |
Show me your package.json deps list. |
I have an observation which might help to narrow it down a bit. |
One possible problem could be that one of your deps has a dependency on |
just upgrate vue-router to 4.1.6! It`s work perfect for me(nuxt 3.0.0) |
Thanks everyone for your suggestions, a lot of good avenues to explore here. @misaon You could be on the money, I'm using
|
Hello! I'm still having the error on e2e tests fixtures. Strange thing is on fixture run correctly while the other fails. Exactly like said before, the content appears then disappears with the error.
Tried |
Also worth noting that I had the same problem with docs/docus, and fixed the problem by switching to yarn. But here even switching to yarn/npm didn't fixed the issue |
@danielroe Steps:
|
The issue seems to be that For now you can workaround with: // https://v3.nuxtjs.org/api/configuration/nuxt.config
export default defineNuxtConfig({
vite: {
resolve: {
dedupe: ['vue-router']
}
}
}) |
Environment
Reproduction
Build to prod
Describe the bug
In the dev environment everything works fine, once the application build to production. on the client side Nuxt RC-13 crashes on the error that the route is undefined.
https://github.com/nuxt/framework/blob/59d8c51b5bd8d8f7de66f83494d9d39110e43c44/packages/nuxt/src/app/components/layout.ts#L73
On Nuxt RC-12 it works fine.
Additional context
Logs
The text was updated successfully, but these errors were encountered: