AI & Agent Dev Bug Sandbox logo
AI & Agent Dev Bug Sandbox
Back to Radar

Turbopack Production Build Fails With 'Expected Chunkable Module For Async Reference' When Using Bknd

Next.js 16.3.5 production build using Turbopack panics with a TurbopackInternalError: 'expected chunkable module for async reference' when the bknd package is used. The webpack build succeeds, indicating a Turbopack-specific issue with async module chunking.

highConfidence 65%Next.jsAffected V16.3.5

Origin Analysis

Turbopack's client chunking context encounters an async reference to a module that is not chunkable (likely a CommonJS or native module from bknd), and lacks a graceful fallback for such non-ECMAScript modules in the async import graph.
1. Install bknd: `bun install bknd` 2. Run production build with Turbopack: `bun run build` 3. Observe FATAL: expected chunkable module for async reference 4. Run `next build --webpack` to see successful build.

Fixing Code Block

Edge Case Audit

Using webpack removes Turbopack performance benefits and may expose different bundling behavior. Any Turbopack-specific optimizations (e.g., turbopackMinify) will be disabled. To rollback, remove the --webpack flag from the build script when the underlying Turbopack bug is fixed.

Ecosystem Topology