Skip to content

Failed to load external module with turbopack and bun #86866

@Haaxor1689

Description

@Haaxor1689

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    TurbopackRelated to Turbopack with Next.js.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions