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

Cannot start nuxt: Cannot read properties of undefined (reading 'hook') #924

Closed
jschroeter opened this issue Oct 5, 2023 · 5 comments
Closed

Comments

@jschroeter
Copy link

Environment

  • Operating System: Linux
  • Node Version: v18.18.0
  • Nuxt Version: 2.17.1
  • CLI Version: 3.9.0
  • Nitro Version: 2.6.3
  • Package Manager: npm@9.4.2
  • Builder: webpack
  • User Config: bridge, serverHandlers, devServerHandlers, devServer, typescript, nitro, buildModules
  • Runtime Modules: -
  • Build Modules: (), @nuxt/bridge@3.0.0-rc.1-28271265.8fa71e1

Reproduction

see Stackblitz (and also happens locally in our Nuxt2 project)

Describe the bug

When running nuxt dev or nuxi dev, I always get this error:

 ERROR  Cannot start nuxt:  Cannot read properties of undefined (reading 'hook')                                  12:38:49

  at NuxtDevServer._load (node_modules/nuxi/dist/chunks/dev2.mjs:243:31)
  at async NuxtDevServer.load (node_modules/nuxi/dist/chunks/dev2.mjs:202:7)
  at async NuxtDevServer.init (node_modules/nuxi/dist/chunks/dev2.mjs:197:5)
  at async Object.run (node_modules/nuxi/dist/chunks/dev-child.mjs:118:5)
  at async runCommand$1 (node_modules/nuxi/dist/shared/nuxi.9d864d83.mjs:1677:7)
  at async runCommand$1 (node_modules/nuxi/dist/shared/nuxi.9d864d83.mjs:1668:11)
  at async runMain$1 (node_modules/nuxi/dist/shared/nuxi.9d864d83.mjs:1800:7)

Additional context

No response

Logs

No response

@wattanx
Copy link
Collaborator

wattanx commented Oct 5, 2023

It will be resolved at nuxt/nuxt#23502.
Until it is released, you can work around it by using nuxi@3.8.4.

ref: #918

@bmulholland
Copy link

Thanks @wattanx! How can we be alerted when the fix is released?

@jschroeter
Copy link
Author

Using nuxi@3.8.4 works, thank you!

@wattanx
Copy link
Collaborator

wattanx commented Oct 6, 2023

@bmulholland
I think it would be good for you to watch nuxt/nuxt#23446 or this issue.
I will make an announcement here when it is released.

@wattanx
Copy link
Collaborator

wattanx commented Oct 25, 2023

@nuxt/bridge@3.0.0-rc.1-28295948.913b8e5 solved the problem!
Wait until 3.0.0-rc.2 or use edge release!
(3.0.0-rc.2 will be released soon.)

https://stackblitz.com/edit/nuxt2-17-bridge-a2ctah-76qbhk

@wattanx wattanx closed this as completed Oct 25, 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