-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
NuxtPage doesn`t work in Nuxt 3.7.3 #23219
Comments
Would you be able to provide a reproduction? 🙏 I tried a to setup a quick example based on your description but the :page-key prop and |
Would you be able to provide a reproduction? 🙏 More infoWhy do I need to provide a reproduction?Reproductions make it possible for us to triage and fix issues quickly with a relatively small team. It helps us discover the source of the problem, and also can reveal assumptions you or we might be making. What will happen?If you've provided a reproduction, we'll remove the label and try to reproduce the issue. If we can, we'll mark it as a bug and prioritise it based on its severity and how many people we think it might affect. If How can I create a reproduction?We have a couple of templates for starting with a minimal reproduction: 👉 https://stackblitz.com/github/nuxt/starter/tree/v3-stackblitz A public GitHub repository is also perfect. 👌 Please ensure that the reproduction is as minimal as possible. See more details in our guide. You might also find these other articles interesting and/or helpful: |
@danielroe sent |
my structrure ![]() |
It doesn`t work in Nuxt 3.7.2 too |
I had the same problem so here's what I did
|
@danielroe Here is the reproduction of the issue: |
Hello, we have the same bug but with the layouts. When we change the page and the layout we dont change the page. We need to force reload on the good url for change the layout and get the new page. |
@danielroe there is a solution? |
Hello, After updating from v.3.7.1 my index.vue page witch has a component does not render or load data when navigating to a nested page. I am loading some data in users/index.vue and passing this data to the component as a prop. This worked fine in v.3.7.1, but the props are undefined in v.3.7.3. v.3.7.1 (working) => https://stackblitz.com/edit/nuxt-starter-m5rkvz?file=pages%2Fusers%2Findex.vue In version v.3.7.1 navigating to users/all would also render any content inside the users/index.vue file as it contains a component. In v3.7.3 navigating to users/all does not render the contents of users/index.vue and does not care if the component is present or not. It only renders the contents of all.vue. |
Hello it's not fix for layouts. |
@TartanLeGrand Do you use setPageLayout function to change your layouts? |
I am encountering an issue where I don't want to alter the layout of my current page, but rather change it when navigating to a new page. I am transitioning from the default layout to a custom layout using definePageMeta. The first page employs the default layout, and the second one uses the custom layout. However, when I switch from the first page to the second page, the layout doesn’t switch. Here is my directory structure:
|
If you're having an issue with layouts, would you perhaps open a new issue with a reproduction? The root cause of this one was incorrectly nesting child routes, and not related to layouts. |
@TartanLeGrand look here - https://stackblitz.com/edit/github-4tumnt?file=pages%2Fcustom%2Findex.vue |
Hi @KamilBeda and @danielroe, Thanks for your quick replies! With @TartanLeGrand, we figured out the issue in our project. It turns out, the Headless UI Dialog component was causing the problem when switching pages with a different layout. Here's the comment that helped us pinpoint the issue: tailwindlabs/headlessui#1496 (comment) |
Hello @danielroe, I've encountered a persistent issue while setting up Nuxt for several e-commerce and media streaming projects. This challenge arises across various environments, including Docker, Bun (as our Node.js runtime), and Nuxt, tested on macOS, Linux, Windows, and WSL 2.0 setups. Initially, I suspected Docker might be the culprit since I used docker-compose to streamline our development setup, aiming to mitigate dependency-related setup issues. However, my investigations have led me to reconsider. The issues manifest in two main areas:
Our stack includes Headless UI, UNOcss, and various Tailwind presets. In an attempt to isolate the issue, I transitioned from a Docker-based setup to a local development environment across Windows, macOS, and Linux Mint 21.3 Cinnamon, suspecting OS-related discrepancies might be at play. However, this change did not resolve the issues. Further experimentation led me to believe the issue might stem from our package manager. However, substituting Bun with npm, pnpm, and Yarn yielded no difference. Starting a new project with the latest version of Nuxt did not eliminate the issues either. Interestingly, issue #2 behaves slightly differently in a local setup; after the initial server restart, subsequent API route changes under /server are recognized without needing further restarts, offering a temporary workaround. Upon closer examination, it seems issue #1 is intricately linked to our layout logic. Our strategy involves a singular app.vue that incorporates NuxtPage and NuxtLayout, along with a custom layout comprising basic components like headers, footers, and a slot. Integrating new or updated routes from /pages into our header component (which utilizes NuxtLink) triggers the 404 errors, whereas directly using routes within page components like index.vue does not cause any issues. To summarize, the root cause appears to be unrelated to the package manager, operating system, or Docker setup; instead, it hinges on how layout management is handled within Nuxt. This revelation steers us away from incorporating such logic within layouts, despite its appeal. Regarding issue #2, I have yet to find a workaround for recognizing file changes within Docker (e.g., /api/example.ts) without a complete server restart. I hope this detailed account aids in diagnosing and addressing these concerns. Thank you for your attention to these matters. |
Environment
`------------------------------
👉 Report an issue: https://github.com/nuxt/nuxt/issues/new 5:33:40 PM
👉 Suggest an improvement: https://github.com/nuxt/nuxt/discussions/new
👉 Read documentation: https://nuxt.com
`
Reproduction
<NuxtPage :page-key="
shop-${shop.slug}" />
Describe the bug
After updating to version 3.7.3 NuxtPage stopped working in the entire project
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: