Skip to content

fix(deps): declare h3 as a runtime dependency - #654

Open
mayuriphad wants to merge 1 commit into
nuxt-modules:mainfrom
mayuriphad:fix/declare-h3-dependency
Open

mayuriphad wants to merge 1 commit into
nuxt-modules:mainfrom
mayuriphad:fix/declare-h3-dependency

Conversation

@mayuriphad

Copy link
Copy Markdown

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

Resolves #651

The server runtime (serverSupabaseClient, serverSupabaseUser, serverSupabaseSession, serverSupabaseServiceRole, utils/cookies, plugins/supabase.server) imports from h3, but h3 is not a dependency of the module. Under pnpm's strict layout, the import resolves to whichever h3 gets hoisted in the app. When another package pulls in h3 v2, the module's getRequestHeader/cookie helpers run against the v2 API with a v1 event, which fails with event.req.headers.get is not a function.

This declares h3 as a runtime dependency with the same ^1.15.11 range the workspace already pins in pnpm-workspace.yaml overrides, so the module always resolves the h3 v1 it is written for. The lockfile entry reuses the h3@1.15.11 package already in the lockfile.

I hand-edited the root importer in pnpm-lock.yaml and did not run pnpm install locally; CI's frozen-lockfile install will confirm it.

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes (not applicable: this is a dependency declaration and the bug depends on the consuming app's pnpm layout)

The server runtime imports from h3 without declaring it, so under pnpm
it resolves to whatever h3 the app hoists. With h3 v2 hoisted,
getRequestHeader fails with "event.req.headers.get is not a function".

Resolves nuxt-modules#651

Signed-off-by: mayuriphad <mayuriphad656@gmail.com>
Copilot AI balanced review requested due to automatic review settings October 29, 2026 05:26
@vercel

vercel Bot commented Oct 29, 2026

Copy link
Copy Markdown

@mayuriphad is attempting to deploy a commit to the NuxtLabs Team on Vercel.

A member of the Team first needs to authorize it.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@pkg-pr-new

pkg-pr-new Bot commented Oct 29, 2026

Copy link
Copy Markdown
npm i https://pkg.pr.new/@nuxtjs/supabase@654

commit: 51cf729

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Undeclared h3 import resolves to v2 under pnpm

2 participants