-
Notifications
You must be signed in to change notification settings - Fork 30.2k
Description
Link to the code that reproduces this issue
https://github.com/naveenkarmegam/next.js/blob/canary/scripts/unpack-next.ts#L29
To Reproduce
To reproduce this issue must use windows os
Summary
Running pnpm unpack-next fails on Windows because Next.js dev tooling builds tar commands using POSIX single-quoted paths ('path').
Windows’ built-in tar.exe treats single quotes as literal characters, causing tarballs to not be found and the command to fail.
Steps
git clone https://github.com/vercel/next.jscd next.jspnpm installpnpm pack-next --no-js-build --tarpnpm unpack-next apps/bundle-analyzer
Current vs. Expected behavior
Current Behavior
The command fails on Windows with an error similar to:
tar: Error opening archive: Failed to open 'D:\...\tarballs\next.tar'
Windows tar.exe treats the single-quoted path as a literal filename, so the tarball cannot be found and unpacking fails.
Expected Behavior
Tarballs should unpack successfully and inject the locally built Next.js packages into the target app without errors.
Provide environment information
Operating System:
Platform: windows
Arch: x64
Version: Windows 11 Pro
Binaries:
Node: 20.18.2
pnpm: 9.6.0Which area(s) are affected? (Select all that apply)
Testing
Which stage(s) are affected? (Select all that apply)
next package testing
Additional context
No response