Skip to content

Fix missing whatwg-url transitive dependencies for Vercel deployment#433

Open
Claude wants to merge 2 commits intomainfrom
claude/fix-module-not-found-error
Open

Fix missing whatwg-url transitive dependencies for Vercel deployment#433
Claude wants to merge 2 commits intomainfrom
claude/fix-module-not-found-error

Conversation

@Claude
Copy link

@Claude Claude AI commented Mar 22, 2026

  • Add whatwg-url, tr46, webidl-conversions as explicit devDependencies in apps/demo/package.json
  • Extend vercel.json includeFiles pattern to bundle whatwg-url, tr46, webidl-conversions
  • Sync with latest main branch and resolve conflicts
Original prompt

Cannot find module '/var/task/apps/demo/node_modules/whatwg-url/index.js'. Please verify that the package.json has a valid "main" entry
Did you forget to add it to "dependencies" in package.json?
Node.js process exited with exit status: 1. The logs above can help with debugging the issue.
Cannot find module '/var/task/apps/demo/node_modules/whatwg-url/index.js'. Please verify that the package.json has a valid "main" entry
Did you forget to add it to "dependencies" in package.json?
Node.js process exited with exit status: 1. The logs above can help with debugging the issue.


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

@vercel
Copy link

vercel bot commented Mar 22, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
objectql-demo Ready Ready Preview, Comment Mar 22, 2026 3:31am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
objectql Ignored Ignored Mar 22, 2026 3:31am

Request Review

@Claude Claude AI changed the title [WIP] Fix module not found error for whatwg-url Fix missing whatwg-url transitive dependencies for Vercel deployment Mar 22, 2026
@Claude Claude AI requested a review from hotlong March 22, 2026 03:32
@hotlong hotlong marked this pull request as ready for review March 23, 2026 07:24
Copilot AI review requested due to automatic review settings March 23, 2026 07:24
@hotlong
Copy link
Contributor

hotlong commented Mar 23, 2026

@copilot 更新主分支的代码并解决冲突

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes a Vercel serverless runtime failure in apps/demo where node-file-trace does not include node-fetch@2.7.0’s transitive dependencies (notably whatwg-url), causing Cannot find module '/var/task/apps/demo/node_modules/whatwg-url/index.js' at runtime.

Changes:

  • Adds explicit whatwg-url, tr46, and webidl-conversions entries to apps/demo’s dependencies list (as currently modeled in that package).
  • Extends apps/demo/vercel.json includeFiles to force-bundle those modules into the deployed function.
  • Updates pnpm-lock.yaml accordingly for the apps/demo importer.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

File Description
apps/demo/package.json Adds explicit whatwg-url, tr46, and webidl-conversions so they’re present in the install graph for the demo app build/deploy.
apps/demo/vercel.json Forces Vercel function bundling to include the newly explicit modules under node_modules/.
pnpm-lock.yaml Lockfile update reflecting the new apps/demo dependency entries.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Copy link
Contributor

Copilot AI commented Mar 23, 2026

@copilot 更新主分支的代码并解决冲突

I've resolved the merge conflict with main locally (accepting main's apps/demo/package.json since it already includes the whatwg-url fix from PR #436), but the push is blocked by a repository protection rule:

GH013: Repository rule violations found for refs/heads/claude/fix-module-not-found-error
Cannot update this protected ref.

Could you either:

  1. Adjust the repository ruleset to allow pushes to claude/* branches, or
  2. Merge main into this branch manually from the GitHub UI

The conflict resolution is straightforward — main already contains all changes from this PR (whatwg-url, tr46, webidl-conversions), so accepting main's version resolves it cleanly.

@hotlong
Copy link
Contributor

hotlong commented Mar 23, 2026

@anthropic-code-agent 更新主分支的代码并解决冲突

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.

4 participants