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

bridge: false results in "Cannot start nuxt: Cannot read properties of undefined (reading 'hook')" #900

Closed
jschroeter opened this issue Sep 7, 2023 · 3 comments · Fixed by #907
Labels
bug Something isn't working

Comments

@jschroeter
Copy link

jschroeter commented Sep 7, 2023

Environment

  • Operating System: Darwin
  • Node Version: v18.17.0
  • Nuxt Version: 2.17.1
  • CLI Version: 3.7.3
  • Nitro Version: 2.6.2
  • Package Manager: npm@9.6.7
  • Builder: webpack
  • User Config: bridge
  • Runtime Modules: -
  • Build Modules: -

Reproduction

  • install Nuxt 2.17.1
  • install Nuxt Bridge
  • set bridge: false as described in docs
  • run nuxi dev

see StackBlitz: https://stackblitz.com/edit/nuxt2-17-bridge-false?file=nuxt.config.ts

Describe the bug

Nuxt doesn't start with the following error:

 ERROR  Cannot start nuxt:  Cannot read properties of undefined (reading 'hook')      10:46:46

  at _load (node_modules/nuxi/dist/chunks/dev-internal.mjs:215:39)
  at async load (node_modules/nuxi/dist/chunks/dev-internal.mjs:261:9)
  at async Object.run (node_modules/nuxi/dist/chunks/dev-internal.mjs:283:5)
  at async runCommand$1 (node_modules/nuxi/dist/shared/nuxi.57fa43de.mjs:1671:5)
  at async runCommand$1 (node_modules/nuxi/dist/shared/nuxi.57fa43de.mjs:1665:7)
  at async runMain$1 (node_modules/nuxi/dist/shared/nuxi.57fa43de.mjs:1783:7)

Additional context

Same happens in my large application which I want to migrate to Nuxt 3 but also in a minimal setup.

Logs

No response

Copy link
Member

I think with bridge: false you should run nuxt dev and not nuxi dev.

@jschroeter
Copy link
Author

Hi Daniel, thanks for looking into this. Unfortunately it doesn't seem to make any difference.

@wattanx
Copy link
Collaborator

wattanx commented Sep 7, 2023

It looks like nitro is running on nuxt dev as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants