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

Upstream hookable issue #1000

Closed
Tracked by #1011
AndreyYolkin opened this issue Dec 1, 2023 · 5 comments
Closed
Tracked by #1011

Upstream hookable issue #1000

AndreyYolkin opened this issue Dec 1, 2023 · 5 comments

Comments

@AndreyYolkin
Copy link
Contributor

AndreyYolkin commented Dec 1, 2023

Environment


  • Operating System: Darwin
  • Node Version: v20.5.0
  • Nuxt Version: 2.17.2
  • CLI Version: 3.10.0
  • Nitro Version: 2.8.1
  • Package Manager: [email protected]
  • Builder: webpack
  • User Config: app, components, modules, plugins, nitro, vite, bridge, runtimeConfig, serverHandlers, devServerHandlers, devServer, typescript, buildModules
  • Runtime Modules: ()
  • Build Modules: (), @nuxt/[email protected]

Reproduction

https://stackblitz.com/edit/github-dwx287-swerdg?file=pages%2Findex.vue,modules%2Fprimary%2Findex.ts

Describe the bug

As mentioned in nuxt/nuxt#24419, Nuxt prior to upcoming 2.17.3 utilises hable package, which doesn't have some features, like unsubscribing from hooks. Nuxt 2.17.3 will use hookable v4, but bridge has v5 in its dependencies.

At least, we should downgrade and lock hookable version to v4.
Also we need to decide:

  1. Provide support in bridge codebase for nuxt 2.17.2 or lower.
  2. Raise minimum required version to 2.17.3

Additional context

No response

Logs

 FATAL  unsub is not a function

  at eval (node_modules/nuxi/dist/chunks/dev2.mjs:272:7)
  at eval (node_modules/hable/dist/hable.js:1:1065)
  at eval (node_modules/hable/dist/hable.js:1:283)
  at async Nuxt.callHook (node_modules/hable/dist/hable.js:1:1034)
@danielroe
Copy link
Member

@wattanx this is closed by #1025, right?

@wattanx
Copy link
Collaborator

wattanx commented Jan 4, 2024

Yes! #1025 resolved this issue.

@wattanx wattanx closed this as completed Jan 4, 2024
@suits-at
Copy link

suits-at commented Jan 18, 2024

I just came across this (already closed) issue because I think actually, it's still (or maybe again?) an issue. Just as mentioned in the description above, now there is hookable v4 in nuxt 2.17.3 and v5 in stable bridge. Therefore if you now try to pnpm i && pnpm run dev you will get a SyntaxError saying The requested module 'PATH/hookable.js' does not provide an export named 'createHooks'. With NPM it does work by the way, so seems to be related to how PNPM handles different versions of the same package. Downgrading nuxt to 2.17.2 also solves the issue, as there is no hookable v4 in use then.
Can you confirm this @wattanx or did I miss something?

Edit: I created a stackblitz for reproduction: https://stackblitz.com/edit/github-wuyjgw?file=package.json

@wattanx
Copy link
Collaborator

wattanx commented Jan 18, 2024

@suits-at
Could you please create a new issue so I might miss it?
(Probably needs to be fixed)

@suits-at
Copy link

@suits-at Could you please create a new issue so I might miss it? (Probably needs to be fixed)

Sure. Here you go: #1078

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

4 participants