question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

definePageMeta doesnt apply the correct layout

See original GitHub issue

Environment

RootDir: /sandbox                                                                    06:59:32
Nuxt project info:                                                                   06:59:32

------------------------------
- Operating System: `Linux`
- Node Version:     `v14.18.1`
- Nuxt Version:     `3.0.0-27406801.569aaeb`
- Package Manager:  `yarn@1.22.17`
- Bundler:          `Vite`
- User Config:      `-`
- Runtime Modules:  `-`
- Build Modules:    `-`
------------------------------

Reproduction

https://codesandbox.io/s/silent-brook-m9q8l?file=/pages/test.vue

Describe the bug

With the recent breaking change, discussed here, https://github.com/nuxt/framework/discussions/2883 . Only the default layout seems to be getting applied. Notice the test page, it should use the custom layout, but doesnt do so and ends up using the default layout.

Additional context

No response

Logs

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:15 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
Blakeinsteincommented, Feb 14, 2022

I think for the developers who are already using nuxt3 to report issues, a short hint with a link to the BC discussion inside the docs would be helpful.

Probably here: v3.nuxtjs.org/getting-started/introduction

and even in the issue template somewhere

1reaction
Blakeinsteincommented, Feb 14, 2022

PRs would be welcome.

Will gladly take this up.

Read more comments on GitHub >

github_iconTop Results From Across the Web

vue.js - How would definePageMeta will be Mocked in Vitest?
I was trying Vitest to write UTs for my app which has Nuxt on the top of Vue. But I am getting definePageMeta...
Read more >
layouts/ · Nuxt Directory Structure
Nuxt provides a customizable layouts framework you can use throughout your application, ideal for extracting common UI or code patterns into reusable layout...
Read more >
Nuxt 3 layout middleware - Reddit
To my understanding, the only way to use middlewares in Nuxt 3 is using definePageMeta. However this doesn't seem to work on layouts...
Read more >
Documentation · Nuxt Color Mode
unknown to render a placeholder or use our <ColorScheme> component. Example: <template> <ColorScheme placeholder ...
Read more >
Untitled
Step 1 — Installing Nuxt in the Example Application In this step, you are going ... However this doesn't seem to work on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found