Nuxt middleware & page setup does not execute in the expected order when refreshing page
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- nuxtjs, typescript
Línea de trabajo
Comienza con la reproducción enlazada en StackBlitz y compara las configuraciones Nuxt-only, Ionic, i18n e Ionic-plus-i18n. Inspecciona la configuración de integración del router en nuxt.config mencionada en la issue y reproduce el comportamiento al actualizar. Se considera terminado cuando la configuración combinada conserva el orden esperado: middleware global, middleware de página, configuración de la app y, después, configuración de la página.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
🐛 The bug
I was using middleware to fetch user configuration data before navigating to pages, when I realized that the page setup was run before the middleware. Through some trial and error I figured out that removing Nuxt/ionic fixed the issue, but I also found out that adding the Nuxtjs/i18n module worsened the issue.
So I created a project tracking the following:
- Global middleware
- Page middleware
- App setup function
- Page setup function
And I got these results:
- (Nuxt alone) works as expected:
- (Nuxt + Nuxt/ionic) App setup gets run first but everything else in the correct order:
- (Nuxt + Nuxtjs/i18n) works as expected:
- (Nuxt + Nuxt/ionic + Nuxtjs/i18n) every page setup is run before middleware
I'm still pretty new to Nuxt & Ionic so I might be completely missing some critical information, but the Nuxt/ionic documentation gives the impression that middleware should just work with no caveats.
🛠️ To reproduce
https://stackblitz.com/edit/hui123
🌈 Expected behaviour
For the execution order to match the basic Nuxt project when refreshing the page, and to also work with the i18n nuxt module
- Global middleware
- Page middleware
- App setup function
- Page setup function
ℹ️ Additional context
Reproductions used to get the different results:
Nuxt middleware order (Nuxt only)
Nuxt middleware order (Ionic)
Nuxt middleware order (i18n)
Nuxt middleware order (Ionic + i18n)
It might be related to the ionic router integration, because if I disable it in nuxt.config the execution order goes back to normal.
- Lenguaje dominante
- TypeScript
- Estrellas
- 458
- Forks
- 53
- Merge medio
- 16 h 28 min
- PR fusionados (30 d)
- 19
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de nuxt-modules/ionic
-
`useHead` does not resolve reactive input on the clientPosiblemente ocupada @Carpediem94 la tomó hace 61 días. Abiertobug
Dificultad 3/5 1-2 días Aptitud para principiantes 74/100
nuxt-modules/ionic#1004 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
nuxt-modules/ionic#908 · 2 reacciones ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 35/100
nuxt-modules/ionic#867 ·
Los mantenedores suelen responder en 1 día
-
bug needs reproduction
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
nuxt-modules/ionic#696 ·
Los mantenedores suelen responder en 1 día
-
IonCardAbiertobug
Dificultad 3/5 1-2 días Aptitud para principiantes 25/100
nuxt-modules/ionic#610 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de nuxt-modules/ionic
Issues similares
-
status: needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
a2ui-project/a2ui#3158 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
hemilabs/ui-monorepo#2475 ·
Los mantenedores suelen responder en 1 día
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
lingdojo/kana-dojo#32279 · 1 comentario · 5 reacciones ·
Los mantenedores suelen responder en 1 día
-
code-quality refactoring
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
github/gh-aw-firewall#9879 ·
Los mantenedores suelen responder en 1 día
-
[Bug]: Arrow-key cursor movement in combined diff view doesn't scroll to keep the cursor visibleAbiertoos:macos
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
Los mantenedores suelen responder en 1 día