Closed timgoeller closed 2 years ago
You are not alone, I also faced the same problem
Looking at this, the issue is caused by not using Bridge. (You need to update your nuxt.config.)
I have an updated config and still am experiencing this issue.
@wolzey Would you share a reproduction?
@danielroe thanks for re-opening and the quick response. I re-applied the changes to upgrade to Nuxt 3 using Bridge and am no longer getting the error. I think we can mark this one down as a user error and re-close. Thanks!
I am still getting the same issue but while using nuxt bridge. I haven't tried upgrading to Nuxt 3 yet though.
So it turns out that this error is avoided if I change my Nuxt.config.js
file to a .ts
file. I'm not sure why. The docs make it seem like this is optional, but to avoid this callHook
error, I had to change it to a .ts
file.
I'm receiving the same error, but on an older project running nuxtJS and Vue 2, along with Vuetify.
Environment:
------------------------------
- Operating System: `Darwin`
- Node Version: `v16.13.2`
- Nuxt Version: `2.16.0-27358576.777a4b7f`
- Package Manager: `yarn@1.22.4`
- Builder: `webpack`
- User Config: `bridge`, `env`, `serverMiddleware`, `head`, `css`, `router`, `modules`, `plugins`, `build`, `buildModules`, `optimizedImages`
- Runtime Modules: `@nuxtjs/axios@5.13.6`, `@nuxtjs/auth@4.9.1`, `cookie-universal-nuxt@2.1.5`, `@nuxtjs/toast@3.3.1`, `@nuxtjs/vuetify@1.12.3`, `nuxt-user-agent@1.2.2`
- Build Modules: `@nuxt/typescript-build@2.1.0`, `@aceforth/nuxt-optimized-images@1.4.0`
------------------------------
Error:
ERROR Cannot read properties of undefined (reading 'callHook') 13:54:25
at Object.invoke (node_modules/nuxi/dist/chunks/dev.mjs:6803:31)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async _main (node_modules/nuxi/dist/cli.mjs:46:20)
I know that "@nuxt/typescript-build": "^2.0.3",
should be removed, but when I remove that, I get errors with importing files in the utilities
folder. I left it in and instead passed this to the Nuxt.config.js
file:
bridge: {
typescript: false,
},
I'm at a loss.
Same for me, I even got a test repo where it happens: https://github.com/Remo/laravel-nuxt-bridge
Anyone fix this issue? Followed the documentation on the nuxt bridge page and came across this error. The core team seriously roll out buggy features.
@Cally99 If you are encountering an issue, please create a new issue with a reproduction and we'll look into it. 😉
@danielroe there is another issue with the same problem and a repo where you can reproduce the problem: https://github.com/nuxt/bridge/issues/314
If you are still getting this error while debugging your migration process, I encountered severe issues in development and according to the migration guide that says that you can disable Bridge if you set bridge: false
in your nuxt.config.js file.
If you do this, you have to start nuxt with the legacy script, because nuxi dev
doesn't work.
Use nuxt dev
Any updates on this?
ERROR Cannot start nuxt: Cannot read properties of undefined (reading 'callHook') 05:45:23
at load (node_modules/nuxi/dist/chunks/dev.mjs:6780:33) at async Object.invoke (node_modules/nuxi/dist/chunks/dev.mjs:6828:5) at async _main (node_modules/nuxi/dist/cli.mjs:50:20)
I really have no idea of even where to start looking.
Facing similar issue when starting dev server. nuxi build
is working though.
Terminal Output:
Browser:
Facing similar issue when starting dev server.
nuxi build
is working though.Terminal Output:
Browser:
I have the exact same issue:
Environment
Darwin
v16.11.0
2.16.0-27358576.777a4b7f
yarn@1.22.17
Webpack
target
,head
,css
,plugins
,components
,buildModules
,modules
,vuetify
,build
-
Build Modules:
@nuxtjs/vuetify@1.12.3
Reproduction
https://github.com/timgoeller/nuxt-bug
Describe the bug
When generating a new empty Nuxt 2 project and applying the steps provided in the Nuxt Bridge getting started guide (https://v3.nuxtjs.org/getting-started/bridge/), calling
yarn dev
throws an error when usingnuxi dev
(usingnuxt
still works).The error message is as follows:
I think it might have to do with this recent change, even though it seems like no one else encountered this issue yet: https://github.com/nuxt/framework/commit/4bd7adae4a7d43f7b906abec1149688d307954a3#diff-86f78f1673e500e055e8a1f266252abe62af18f0b52424f09275d7f2b1e96d3f
Additional context
No response
Logs