You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue covers 3 packages: nuxt, nuxi and @nuxt/bridge
While digging inside outdated internals I've found out, that Nuxt Bridge relies on hookable package for types, but Nuxt 2 uses hable, which is the same package, but with old name and outdated versions. hable package doesn't even support removing hooks, which breaks hooks system in bridge with nitro.
For example, I write this code in a module:
nuxt.callHook('restart')
then I get
nuxi expects from hookable to return self-removing function, which only exists from v4 (hable is v3). @nuxt/bridge uses v5 as types reference, which is not entirely true.
With updating hookable in nuxt 2 to v4 (not 5, because it will break the usage with ie11, see https://github.com/unjs/hookable#migration) and also downgrading types in @nuxt/bridge to the same version we can solve this issue/proposal
Additional information
Would you be willing to help implement this feature?
Describe the feature
This issue covers 3 packages: nuxt, nuxi and @nuxt/bridge
While digging inside outdated internals I've found out, that Nuxt Bridge relies on
hookable
package for types, but Nuxt 2 useshable
, which is the same package, but with old name and outdated versions.hable
package doesn't even support removing hooks, which breaks hooks system in bridge with nitro.For example, I write this code in a module:
then I get
nuxi expects from hookable to return self-removing function, which only exists from v4 (hable is v3). @nuxt/bridge uses v5 as types reference, which is not entirely true.
With updating hookable in nuxt 2 to v4 (not 5, because it will break the usage with ie11, see https://github.com/unjs/hookable#migration) and also downgrading types in @nuxt/bridge to the same version we can solve this issue/proposal
Additional information
Final checks
The text was updated successfully, but these errors were encountered: