fix(demo): add whatwg-url transitive deps to Vercel bundle#436
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…ent bundle Transitive dependencies of node-fetch@2.7.0 (via cross-fetch@4.1.0) were missing from vercel.json includeFiles and not declared as explicit devDependencies. This caused the Vercel serverless function to fail at runtime with 'Cannot find module whatwg-url/index.js'. Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com> Agent-Logs-Url: https://github.com/objectstack-ai/objectql/sessions/5ec52906-e8f4-45a1-b5f5-2b16ac0d19c6
Copilot
AI
changed the title
[WIP] Fix error loading whatwg-url module in demo app
fix(demo): add whatwg-url transitive deps to Vercel bundle
Mar 22, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes the apps/demo Vercel serverless deployment crash caused by missing node-fetch@2.7.0 transitive dependencies in the bundled function output, by explicitly hoisting and bundling the required packages.
Changes:
- Add
whatwg-url,tr46, andwebidl-conversionsas explicitdevDependenciesforapps/demo(and lockfile updates). - Extend
apps/demo/vercel.jsonincludeFilesto ensure those packages are included in the serverless bundle. - Document the deployment fix in
CHANGELOG.md.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| pnpm-lock.yaml | Locks the newly added apps/demo devDependencies (whatwg-url, tr46, webidl-conversions). |
| CHANGELOG.md | Adds an Unreleased “Fixed” entry documenting the Vercel bundling fix and the underlying dependency chain. |
| apps/demo/vercel.json | Updates includeFiles to bundle the newly added transitive dependency packages. |
| apps/demo/package.json | Adds the three packages as explicit devDependencies to ensure they are present at the top-level node_modules/ for bundling. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Vercel deployment crashes with
Cannot find module 'whatwg-url/index.js'— transitive deps ofnode-fetch@2.7.0(viacross-fetch) were missing from the serverless function bundle.Dependency chain:
cross-fetch→node-fetch@2.7.0→whatwg-url@5.0.0→tr46,webidl-conversionsChanges
apps/demo/vercel.json— addwhatwg-url,tr46,webidl-conversionstoincludeFilesglobapps/demo/package.json— declare all three as explicitdevDependenciesso they're hoisted to top-levelnode_modules/CHANGELOG.md— document fixOriginal prompt
⌨️ Start Copilot coding agent tasks without leaving your editor — available in VS Code, Visual Studio, JetBrains IDEs and Eclipse.