Undefined route in Nuxt layout component in prod build
See original GitHub issueEnvironment
- Operating System: `Linux`
- Node Version: `v16.18.0`
- Nuxt Version: `3.0.0-rc.13`
- Nitro Version: `0.6.1`
- Package Manager: `pnpm@7.15.0`
- Builder: `vite`
- User Config: `modules`, `oxyshopNuxt`, `i18n`, `experimental`
- Runtime Modules: `normalizedModule()`, `normalizedModule()`
- Build Modules: `-`
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
TypeError: Cannot read properties of undefined (reading 'meta')
at zc.fn (entry.6b774f36.js:78:63198)
at zc.run (entry.6b774f36.js:1:4282)
at get value [as value] (entry.6b774f36.js:1:12410)
at Proxy.<anonymous> (entry.6b774f36.js:78:63258)
at fl (entry.6b774f36.js:1:15833)
at St (entry.6b774f36.js:1:49906)
at zc.V [as fn] (entry.6b774f36.js:1:49994)
at zc.run (entry.6b774f36.js:1:4282)
at G.T.update (entry.6b774f36.js:1:50299)
at G (entry.6b774f36.js:1:50325)
nE @ entry.6b774f36.js:1
Issue Analytics
- State:
- Created 10 months ago
- Reactions:1
- Comments:25 (19 by maintainers)
Top Results From Across the Web
nuxt router-module render function or template not defined in ...
when i remove '@nuxtjs/router' from build modules in nuxt.config.js file, the error will ...
Read more >The build Property - Nuxt
Nuxt lets you customize the webpack configuration for building your web application as you want.
Read more >How To Navigate Between Views with Vue Router
You will also learn the different types of routes available to ... Next, create a Home.vue component inside of a directory called views...
Read more >Understand Routing in Vue.js With Examples | by SaidHayani
Vue.js provide bunch of features to build a reusable web components,Routing ... to explain how Vue.js Routers work by building a Vue- template...
Read more >Creating Server-side Rendered Vue.js Apps Using Nuxt.js
<template> <h1>About Page</h1> </template>. When you save, Nuxt will re-generate the routes for you. Seeing as we called our component about.vue , if...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I am on v4.1.6 since it was released and yet I still face this error on Nuxt edge.
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.