nextjs - 💡(How to fix) Fix Windows (`next-swc.node`): Use MSVC's `link.exe` rather than clang's `lld.exe` generating `next-swc.node` to avoid dynamic link issue. [3 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vercel/next.js#86036Fetched 2026-04-08 02:12:53
View on GitHub
Comments
3
Participants
2
Timeline
8
Reactions
0
Author
Timeline (top)
commented ×3labeled ×2closed ×1issue_type_added ×1

Error Message

~\Repos\play_nextjs> pnpm dev

[email protected] dev C:\Users\Administrator\Repos\play_nextjs next dev

⚠ Attempted to load @next/swc-win32-x64-msvc, but an error occurred: A dynamic link library (DLL) initialization routine failed . \?\C:\Users\Administrator\Repos\play_nextjs\node_modules.pnpm@[email protected]\node_modules@next\swc-win32-x64 -msvc\next-swc.win32-x64-msvc.node ▲ Next.js 16.0.1 (Turbopack)

✓ Starting... Skipping creating a lockfile at C:\Users\Administrator\Repos\play_nextjs.next\dev\lock because we're using WASM bindings Error: turbo.createProject is not supported by the wasm bindings. at ignore-listed frames ⚠ Attempted to load @next/swc-win32-x64-msvc, but an error occurred: A dynamic link library (DLL) initialization routine failed . \?\C:\Users\Administrator\Repos\play_nextjs\node_modules.pnpm@[email protected]\node_modules@next\swc-win32-x64 -msvc\next-swc.win32-x64-msvc.node

 ELIFECYCLE  Command failed with exit code 3221225477. ~\Repos\play_nextjs> node -p "process.arch" x64

Root Cause

✓ Starting... Skipping creating a lockfile at C:\Users\Administrator\Repos\play_nextjs.next\dev\lock because we're using WASM bindings Error: turbo.createProject is not supported by the wasm bindings. at ignore-listed frames ⚠ Attempted to load @next/swc-win32-x64-msvc, but an error occurred: A dynamic link library (DLL) initialization routine failed . \?\C:\Users\Administrator\Repos\play_nextjs\node_modules.pnpm@[email protected]\node_modules@next\swc-win32-x64 -msvc\next-swc.win32-x64-msvc.node

Code Example

~\Repos\play_nextjs> pnpm dev

> play_nextjs@0.1.0 dev C:\Users\Administrator\Repos\play_nextjs
> next dev

Attempted to load @next/swc-win32-x64-msvc, but an error occurred: A dynamic link library (DLL) initialization routine failed
.
\\?\C:\Users\Administrator\Repos\play_nextjs\node_modules\.pnpm\@next+swc-win32-x64-msvc@16.0.1\node_modules\@next\swc-win32-x64
-msvc\next-swc.win32-x64-msvc.node
Next.js 16.0.1 (Turbopack)
   - Local:        http://localhost:3000
   - Network:      http://192.168.122.242:3000

Starting...
   Skipping creating a lockfile at C:\Users\Administrator\Repos\play_nextjs\.next\dev\lock because we're using WASM bindings
Error: `turbo.createProject` is not supported by the wasm bindings.
    at ignore-listed frames
Attempted to load @next/swc-win32-x64-msvc, but an error occurred: A dynamic link library (DLL) initialization routine failed
.
\\?\C:\Users\Administrator\Repos\play_nextjs\node_modules\.pnpm\@next+swc-win32-x64-msvc@16.0.1\node_modules\@next\swc-win32-x64
-msvc\next-swc.win32-x64-msvc.node

ELIFECYCLECommand failed with exit code 3221225477.
~\Repos\play_nextjs> node -p "process.arch"
x64

---

Solution: Use MSVC's `link.exe` rather than clang's `lld.exe` generating `next-swc.node` to avoid dynamic link issue.
RAW_BUFFERClick to expand / collapse

Solution: Use MSVC's link.exe to generate next-swc.node binary. Never use clang's toolchain on Windows.

https://github.com/aaravlu/play_nextjs

I find out you just use clang's lld.exe to generate the final next-swc.node binary:

Note the linker version -- 14.0, the binary was linked by clang's lld.exe rather than MSVC's link.exe <img width="2904" height="1575" alt="Image" src="https://github.com/user-attachments/assets/78213aa7-2d6f-4fcb-9dd5-9d30b7a3393c" />

~\Repos\play_nextjs> pnpm dev

> [email protected] dev C:\Users\Administrator\Repos\play_nextjs
> next dev

 ⚠ Attempted to load @next/swc-win32-x64-msvc, but an error occurred: A dynamic link library (DLL) initialization routine failed
.
\\?\C:\Users\Administrator\Repos\play_nextjs\node_modules\.pnpm\@[email protected]\node_modules\@next\swc-win32-x64
-msvc\next-swc.win32-x64-msvc.node
   ▲ Next.js 16.0.1 (Turbopack)
   - Local:        http://localhost:3000
   - Network:      http://192.168.122.242:3000

 ✓ Starting...
   Skipping creating a lockfile at C:\Users\Administrator\Repos\play_nextjs\.next\dev\lock because we're using WASM bindings
Error: `turbo.createProject` is not supported by the wasm bindings.
    at ignore-listed frames
 ⚠ Attempted to load @next/swc-win32-x64-msvc, but an error occurred: A dynamic link library (DLL) initialization routine failed
.
\\?\C:\Users\Administrator\Repos\play_nextjs\node_modules\.pnpm\@[email protected]\node_modules\@next\swc-win32-x64
-msvc\next-swc.win32-x64-msvc.node

 ELIFECYCLE  Command failed with exit code 3221225477.
~\Repos\play_nextjs> node -p "process.arch"
x64

Provide environment information

Solution: Use MSVC's `link.exe` rather than clang's `lld.exe` generating `next-swc.node` to avoid dynamic link issue.

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

SWC

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

next dev (local)

extent analysis

TL;DR

Use MSVC's link.exe to generate the next-swc.node binary instead of clang's lld.exe to resolve the dynamic link library initialization routine failure.

Guidance

  • Verify that the next-swc.node binary is being generated using MSVC's link.exe by checking the linker version.
  • Ensure that the @next/swc-win32-x64-msvc package is installed and configured correctly.
  • Try reinstalling the @next/swc-win32-x64-msvc package using pnpm to ensure that the correct binary is generated.
  • Check the environment variables and configuration files to ensure that MSVC's link.exe is being used instead of clang's lld.exe.

Example

No code snippet is provided as the issue is related to the build process and linker configuration.

Notes

The issue seems to be specific to the Windows environment and the use of clang's lld.exe instead of MSVC's link.exe. The solution provided in the issue body suggests using MSVC's link.exe to generate the next-swc.node binary.

Recommendation

Apply workaround: Use MSVC's link.exe to generate the next-swc.node binary, as suggested in the issue body, to avoid the dynamic link library initialization routine failure. This is because the issue is caused by the use of clang's lld.exe instead of MSVC's link.exe, and switching to MSVC's link.exe should resolve the issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING