Issue involves Bun runtime-specific module loading failure with Turbopack.
The issue involves a failure to load external modules like '@aws-sdk/client-s3' when using Turbopack with the Bun runtime. The problem seems specific to Bun, as it works fine with Node. The fix likely requires understanding both Turbopack and Bun's module resolution mechanisms.
https://github.com/Haaxor1689/next-turbopack-issue-repro
bun ibun --bun dev (--bun is important to run with bun runtime)You get following error when importing anything from "@aws-sdk/client-s3".
Failed to load external module @aws-sdk/client-s3-ecbef8e33fd0b8f0: ResolveMessage: Cannot find module '@aws-sdk/client-s3-ecbef8e33fd0b8f0' from 'C:\Projects\reproduction-app\.next\dev\server\chunks\ssr\[root-of-the-server]__8c5801f7._.js'
Operating System:
Platform: win32
Arch: x64
Version: Windows 11 Pro
Available memory (MB): 65451
Available CPU cores: 16
Binaries:
Node: 23.10.0
npm: 10.9.2
Yarn: N/A
pnpm: 10.7.0
Relevant Packages:
next: 16.1.0-canary.14 // Latest available version is detected (16.1.0-canary.14).
eslint-config-next: N/A
react: 19.2.0
react-dom: 19.2.0
typescript: 5.9.3
Next.js Config:
output: N/A
Turbopack
next dev (local)
Since Bun is not in next info - I'm using Bun v1.3.2
This issue was already reported once by me and closed as fixed here #86652. This solved the issue in 16.1.0-canary.10 for node runtime but the issue in bun runtime still persists.
Claim this issue to let others know you're working on it. You'll earn 20 points when you complete it!