vercel / vercel/next.js

Build fails with vanilla-extract and edge runtime

Open
#76,930 17 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

CSS locked Runtime Webpack
Dominant language
JavaScript
Stars
142k
Forks
32.4k
Avg merge
2d 14h
Merged PRs (30d)
351

Description

Link to the code that reproduces this issue

https://github.com/miktirr/nextjs-build-fail-reproduction

To Reproduce
  1. Install dependencies with pnpm install
  2. Run pnpm build
  3. The build fails to compile: “Conflict: Multiple assets emit different content to the same filename middleware-manifest.json”
Image
Current vs. Expected behavior

The expectation is that build succeeds with every run. Currently a clean build fails.

Provide environment information
Operating System:
  Platform: darwin
  Arch: x64
  Version: Darwin Kernel Version 24.3.0: Thu Jan  2 20:22:00 PST 2025; root:xnu-11215.81.4~3/RELEASE_X86_64
  Available memory (MB): 32768
  Available CPU cores: 16
Binaries:
  Node: 23.9.0
  npm: 10.9.2
  Yarn: 1.22.22
  pnpm: 10.6.1
Relevant Packages:
  next: 15.2.2-canary.4 // Latest available version is detected (15.2.2-canary.4).
  eslint-config-next: N/A
  react: 19.0.0
  react-dom: 19.0.0
  typescript: 5.8.2
Next.js Config:
  output: N/A
Which area(s) are affected? (Select all that apply)

Webpack

Which stage(s) are affected? (Select all that apply)

next build (local)

Additional context

The problem seems to be introduced by version 15.2.0.

There is a related issue open in vanilla-extract’s repo: https://github.com/vanilla-extract-css/vanilla-extract/issues/1554

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked reproduction: run pnpm install and pnpm build, confirming the middleware-manifest.json conflict on the reported Next.js version. Compare the behavior around the 15.2.0 change and the related vanilla-extract issue; done means clean builds succeed consistently without the conflicting asset error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, next.js, react, typescript, webpack
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.