Skip to content

fix: declare h3 runtime dependency - #541

Merged
fago merged 1 commit into
drunomics:2.xfrom
StirStudios:fix/declare-h3-runtime-dependency
Oct 12, 2026
Merged

fago merged 1 commit into
drunomics:2.xfrom
StirStudios:fix/declare-h3-runtime-dependency

Conversation

@StirStudios

Copy link
Copy Markdown
Contributor

Nuxt 4 page SSR can fail when this module resolves an unrelated, hoisted H3 2 installation. The runtime imports appendResponseHeader from h3, but the package does not declare H3. H3 2 expects event.res.headers, whereas Nuxt 4's Nitro server supplies an H3 1 event. Forwarding a Drupal response header then throws Cannot read properties of undefined (reading 'append').

Declare h3: ^1.15.11 as a runtime dependency and update the npm lockfile. This scopes resolution to the module without overriding H3 2 for packages that need it. It is independent of #538.

Validation:

  • New dependency regression fails without the declaration and passes with it; it also exercises repeated response-header forwarding with Node request/response objects.
  • Packaging suite: 8 tests passed.
  • Basic Nuxt end-to-end suite: 3 tests passed.
  • ESLint and diff checks passed.
  • In a local Nuxt 4 production consumer, adding this exact dependency via pnpm packageExtensions changed SSR from HTTP 500 to HTTP 200. Homepage, service and project routes passed at mobile and desktop widths, with carousel and project-overlay interactions verified.

@fago
fago merged commit 53287f2 into drunomics:2.x Oct 12, 2026
1 check passed
@fago

fago commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

good catch, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants