Skip to content
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

app.options is undefined #614

Closed
stephenjason89 opened this issue Nov 6, 2022 · 2 comments
Closed

app.options is undefined #614

stephenjason89 opened this issue Nov 6, 2022 · 2 comments

Comments

@stephenjason89
Copy link

Environment


  • Operating System: Darwin
  • Node Version: v18.7.0
  • Nuxt Version: 2.16.0-27720022.54e852f
  • Nitro Version: 0.6.1
  • Package Manager: yarn@3.2.3
  • Builder: webpack
  • User Config: buildDir, srcDir, bridge, components, ssr, dev, alias, image, generate, content, head, typescript, publicRuntimeConfig, privateRuntimeConfig, css, loading, loadingIndicator, plugins, buildModules, modules, proxy, vuetify, build, serverHandlers, devServerHandlers
  • Runtime Modules: @nuxt/content@1.15.1, @nuxtjs/vuetify@1.12.3, @nuxt/image@0.7.1, @nuxtjs/proxy@2.1.0, nuxt-social-meta@1.0.0
  • Build Modules: (), nuxt-storm@1.1.3, nuxt-compress@5.0.0, @pinia/nuxt@0.4.2, @vueuse/nuxt@9.3.0, ~/modules/apolloSSR, @nuxt/bridge@3.0.0-27778503.de9e5c2

Reproduction

After upgrading from
bridge-edge@3.0.0-27699693.0bb392e
to
bridge-edge@3.0.0-27778503.de9e5c2

I am getting errors on
node_modules/nuxi/dist/chunks/index2.mjs
Specifically this line
image

please note that i am using
bridge: {
nitro: false,
}

Describe the bug

image

After console logging app, I can see that app doesn't have a property options which causes this error.

Additional context

No response

Logs

No response

@AndreyYolkin
Copy link
Contributor

AndreyYolkin commented Mar 27, 2023

It's because nuxi relies on h3, but nuxt without nitro works with connect, In node_modules/nuxi/dist/chunks/index2.mjs find string:

      await app.handler(event);

and replace it with

      if (app.handler) {
        await app.handler(event);
      } else {
        await app.handle(req, res);
      }

Actually this is not a good solution, because in source code nuxi imports toNodeListener from h3. May be we should detect in other way, but this looks like minimal workaround

@wattanx
Copy link
Collaborator

wattanx commented May 18, 2023

Are you still encountering this? It seems to be resolved in the latest version.
Let me know if not; I'm happy to reopen.

Also, if nitro: false, you need to use the nuxt command.

@wattanx wattanx closed this as completed May 18, 2023
@danielroe danielroe mentioned this issue Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants