Link to the code that reproduces this issue
https://codesandbox.io/p/sandbox/github/vercel/next.js/tree/canary/examples/reproduction-template
To Reproduce
- Install pnpm version 10.4.1 using
pnpm self-update 10.4
- Create project
pnpm create next-app@latest .
- Try to install manually
pnpm i
Current vs. Expected behavior
Expected: pnpm i works nicely
Current: pnpm i produces this error:
ERROR packages field missing or empty
Provide environment information
This project is configured to use pnpm because /Users/alfonsusac/package.json has a "packageManager" field
This project is configured to use pnpm because /Users/alfonsusac/package.json has a "packageManager" field
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:55 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6031
Available memory (MB): 36864
Available CPU cores: 14
Binaries:
Node: 20.19.5
npm: 10.8.2
Yarn: N/A
pnpm: 10.33.0
Relevant Packages:
next: 16.2.1 // Latest available version is detected (16.2.1).
eslint-config-next: N/A
react: 19.2.4
react-dom: 19.2.4
typescript: 5.9.3
Next.js Config:
output: N/A
Which area(s) are affected? (Select all that apply)
create-next-app
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
I expected the packages prop in pnpm-workspace.yaml to be omitted only when pnpm version is after 10.4.1 but after checking source code, it is being ommiteed for all version after 10.
Relevant Part of code
|
if (pnpmMajorVersion === null || pnpmMajorVersion >= 10) { |
Relevant issue/pr
Link to the code that reproduces this issue
https://codesandbox.io/p/sandbox/github/vercel/next.js/tree/canary/examples/reproduction-template
To Reproduce
pnpm self-update 10.4pnpm create next-app@latest .pnpm iCurrent vs. Expected behavior
Expected: pnpm i works nicely
Current: pnpm i produces this error:
Provide environment information
Which area(s) are affected? (Select all that apply)
create-next-app
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
I expected the
packagesprop inpnpm-workspace.yamlto be omitted only when pnpm version is after 10.4.1 but after checking source code, it is being ommiteed for all version after 10.Relevant Part of code
next.js/packages/create-next-app/templates/index.ts
Line 331 in 1693574
Relevant issue/pr