Turbopack: Create junction points instead of symlinks on Windows (#87606)
Next 16.1 changed Turbopack's external packaging to use symlinks.
Symlinks require elevated privileges on Windows if "Developer Mode" is
not enabled. We can work around this by using junction points, which are
mostly equivalent, but:
- They only work with directories.
- They can only point to absolute paths, not relative paths.
Fixes #87334
Fixes #87607
Fixes #87603
Fixes #87605
Fixes #87559
Fixes #87604
Fixes #87601
Fixes #87599
Fixes #87598
Fixes #87596
Fixes #87595
Fixes #87592
Fixes #87590
Fixes #87589
Fixes #87473
Fixes #87586
Fixes #87585
Fixes #87584
Fixes #87583
Fixes #87582
Fixes #87576
Fixes #87575
Fixes #87574
Fixes #87573
Fixes #87572
Fixes #87571
Fixes #87568
... and many more
Also:
Fixes #69858 (related issue about `output: 'standalone'` on Windows.
## Testing
- Disable Developer Mode on Windows, reboot, and then verify that
symlink creation fails.
- Make a payload app with `pnpx create-payload-app` (just pick sqlite
for the database when prompted), and then update the app with `pnpx
@next/codemod upgrade 16.1.0`.
- Add `output: 'standalone'` to the `next.config.js`.
- Try running `pnpm build`
---------
Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>