Skip to content

fix: when built and previewed, error 500 due to undefined beforeResolve pops up #484

@Hibryda

Description

@Hibryda

🐛 The bug

Versions:

  • @nuxtjs/ionic: 0.12.1
  • nuxt: 3.8.1,

Only app.vue and pages/index.vue present, containing the simplest arrangement as the following:

  • app.vue
<template>
  <ion-app>
    <ion-router-outlet />
  </ion-app>
</template>
  • index.vue
<template>
  <ion-page>
    <ion-content>
        Dummy text
    </ion-content>
  </ion-page>
</template>

Nuxt config:

export default defineNuxtConfig({
  // devtools: { enabled: true },
  modules: ["@nuxtjs/ionic"],
  ssr: false
})

When built and previewed, the following error is reported:
[nuxt] error caught during app initialization TypeError: Cannot read properties of undefined (reading 'beforeResolve')

🛠️ To reproduce

https://stackblitz.com/edit/github-kscu4y

🌈 Expected behaviour

No error

ℹ️ Additional context

Switching off router integration resolves the issue, meaning that here lies the problem.

The issue is present only when the app is built, in the development mode everything works fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions