Skip to content

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

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

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

Vercel deployment fails with "Cannot find module '/var/task/apps/demo/node_modules/whatwg-url/index.js'" because node-file-trace doesn't bundle transitive dependencies of node-fetch@2.7.0.

Changes

  • apps/demo/package.json: Added explicit devDependencies for whatwg-url@^5.0.0, tr46@^0.0.3, and webidl-conversions@^3.0.1
  • apps/demo/vercel.json: Extended includeFiles pattern to bundle these modules in serverless function (200/256 chars)

Dependency Chain

@libsql/client → @libsql/hrana-client → cross-fetch@4.1.0 
  → node-fetch@2.7.0 → whatwg-url@5.0.0 
    → tr46@0.0.3, webidl-conversions@3.0.1

Vercel's bundler requires both explicit package.json entries and includeFiles patterns for transitive dependencies to ensure they're copied to /var/task during deployment.

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.

@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
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.

2 participants