Skip to content

Fix build to make flattenSourceMap work#18

Merged
ijjk merged 2 commits intomainfrom
mischinc/fix-flatten-sourcemap
Feb 5, 2026
Merged

Fix build to make flattenSourceMap work#18
ijjk merged 2 commits intomainfrom
mischinc/fix-flatten-sourcemap

Conversation

@mischnic
Copy link
Collaborator

@mischnic mischnic commented Feb 5, 2026

Is there a reason why you are bundling source-map into dist? An alternative (cleaner) solution would be to make it external

It worked thus far because only Turbopack emits sectioned sourcemaps, so this codepath was never hit with Webpack.

This was the error message:

$ NEXT_DEPLOYMENT_ID=123 pnpm next build test/production/deterministic-build

> nextjs-project@0.0.0 next /Users/niklas/code/next.js-other
> cross-env NEXT_PRIVATE_LOCAL_DEV=1 NEXT_TELEMETRY_DISABLED=1 NODE_OPTIONS="--trace-deprecation --enable-source-maps" next "build" "test/production/deterministic-build"

▲ Next.js 16.2.0-canary.28 (Turbopack)
- Experiments (use with caution):
  · adapterPath: "/Users/niklas/code/adapter-vercel/packages/adapter/dist/index.js"

  Creating an optimized production build ...
✓ Compiled successfully in 7.8s
  Skipping validation of types
⚠ /api/pages-api/edge provided runtime 'experimental-edge'. It can be updated to 'edge' instead.
⚠ You are using an experimental edge runtime, the API might change.
⚠ Using edge runtime on a page currently disables static generation for that page
✓ Collecting page data using 11 workers in 600ms    
✓ Generating static pages using 11 workers (7/7) in 121ms
  Running onBuildComplete from Vercel
⨯ Failed to run onBuildComplete from Vercel

> Build error occurred
[Error: ENOENT: no such file or directory, open '/Users/niklas/code/adapter-vercel/packages/adapter/dist/mappings.wasm'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/Users/niklas/code/adapter-vercel/packages/adapter/dist/mappings.wasm'
}

@mischnic mischnic requested a review from ijjk February 5, 2026 10:57
@changeset-bot
Copy link

changeset-bot bot commented Feb 5, 2026

🦋 Changeset detected

Latest commit: c0cfadd

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@next-community/adapter-vercel Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@mischnic mischnic force-pushed the mischinc/fix-flatten-sourcemap branch from 493c00e to c0cfadd Compare February 5, 2026 14:18
@ijjk ijjk merged commit fbd123b into main Feb 5, 2026
2 checks passed
@ijjk ijjk deleted the mischinc/fix-flatten-sourcemap branch February 5, 2026 17:11
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