Skip to main content
GoodFirstPicks
DashboardIssuesReposLeaderboard

GoodFirstPicks by Leaveitblank © 2026

CreatorRequest a RepoPrivacy PolicyTerms of Service
Failed to load external module with turbopack and bun | GoodFirstPicks

Failed to load external module with turbopack and bun

vercel/next.js 19 comments 1mo ago
View on GitHub
mediumopenScope: somewhat clearSkill match: maybeNext.jsTypeScriptReact

Why this is a good first issue

Issue involves Bun runtime-specific module loading failure with Turbopack.

AI Summary

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.

Issue Description

Link to the code that reproduces this issue

https://github.com/Haaxor1689/next-turbopack-issue-repro

To Reproduce

  1. bun i
  2. bun --bun dev (--bun is important to run with bun runtime)

Current vs. Expected behavior

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'

Provide environment information

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

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

Turbopack

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

next dev (local)

Additional context

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.

GitHub Labels

Turbopacklinear: turbopack

Want to work on this?

Claim this issue to let others know you're working on it. You'll earn 20 points when you complete it!

Risk Flags

  • Bun runtime specific
  • external module loading
Loading labels...

Details

Points20 pts
Difficultymedium
Scopesomewhat clear
Skill Matchmaybe
Test Focusedno