PANE

Bun developers face runtime errors with dynamic imports

10 posts in the last 60 days, all from GitHub.

“What version of Bun is running? 1.4.4 canary.1+aa1c7b96e , official Darwin arm64 PR build of commit aa1c7b96e564f9f7a36711bb692cd814ad17ddc2 from 45631. What is the issue? Compiling a dynamic import of a CommonJS module with sibling declarations panics in Lower: This reproduces…”
GitHub
“What version of Bun is running? oven/bun:1.3.12 alpine What platform is your computer? Ubuntu 24.04 LTS (64 bit) What steps can reproduce the bug? Even when I close all non system applications, Bun v1.3.12 freezes my whole system (32 GB DDR5 RAM). I am forced to hard reboot the…”
GitHub
“What version of Bun is running? 1.4.4+38afee6c8 (also 1.4.6 canary.1+302ba1f9c and a build of main at c43e176916) What platform is your computer? Linux 7.0.0 42 generic x86 64 What steps can reproduce the bug? What is the expected behavior? ok every time: the first import, with…”
GitHub

Developers using Bun are encountering issues where dynamic imports trigger runtime auto-install, leading to maximum call stack size exceeded errors. This problem appears specific to Linux environments and is hindering the stability of applications built with Bun.

devtoolsjavascriptprogramminglinuxdevelopment
FIT
0%
SIGNAL
50%
SOURCES21
FRESHEST POST3D AGO
TRACKED SINCE71D AGO

SOURCES (21)

“What version of Bun is running? 1.4.4+38afee6c8 (also 1.4.6 canary.1+302ba1f9c and a build of main at c43e176916) What platform is your computer? Linux 7.0.0 42 generic x86 64 What steps can reproduce the bug? What is the expected behavior? ok every time: the first import,…”

GITHUB3d ago

“What version of Bun is running? 1.3.14 (0d9b296af); also 1.4.0 (34cbb9a40) and 1.4.5 (a7733435c). Last good: 1.3.13 (bf2e2cecf). What platform is your computer? Linux arm64 ( oven/bun:<version containers) and macOS arm64 What steps can reproduce the bug? Start several dynamic import() calls of the same , not yet loaded module in the same task, and record the order in which their promises settle. dep.mjs : repro.mjs : What is the expected behavior? The promises settle in call order, as on Bun 1.3”

GITHUB4d ago

“What version of Bun is running? 1.4.5+a7733435c (also reproduces on 1.4.5 canary.20261127.1, which reports 1.4.6) What platform is your computer? Linux 6.18.62 127.179.amzn2023.aarch64 aarch64 aarch64 What steps can reproduce the bug? minify syntax (and so minify and compile minify ) inlines a const string into a dynamic import() , and the bundler then resolves the inlined specifier as if it had been a literal. A package that hides an optional peer behind a variable so bundlers leave it alone no”

GITHUB5d ago

“What version of Bun is running? 1.4.4 from the official oven/bun:1.4.4 debian Linux amd64 image, manifest sha256:b740c3f5600e6360684f240d31c67ffb759def968bfa98ed98c4cce970707735 . Also reproduced on 1.4.2. What platform is your computer? Linux x86 64, Debian Bookworm / glibc, in a network disabled gVisor container. The addon was built with the Node.js 26.10.0 headers and GCC from the pinned Node Bookworm image. What steps can reproduce the bug? Use a Linux x86 64 workspace with Node.js 26.10.0,”

GITHUB17d ago

“What version of Bun is running? 1.4.4 canary.1+89452d2ac (also 1.4.4+38afee6c8) What platform is your computer? Microsoft Windows NT 10.0.26300.0 x64 What steps can reproduce the bug? The script in https://gist.github.com/YevheniiKotyrlo/1da683545acfcb31b6a220eb509469e6 runs every step in a fresh folder: 1. Create package.json : { "private": true, "dependencies": { "make dir": "4.0.0", "semver": "6.3.1" } } . make dir 4.0.0 depends on semver ^7.5.3 . 2. Run bun install lockfile only . bun.lock h”

GITHUB22d ago

“What version of Bun is running? 1.4.4 canary.1+cdfa19bba What platform is your computer? Linux 6.8.0 142 lowlatency x86 64 x86 64 What steps can reproduce the bug? What is the expected behavior? Importing node:zlib does not make trim conclude that arbitrary property names are looked up at run time ( String.prototype.toLocaleLowerCase with a non constant locale, console.takeHeapSnapshot , Atomics , etc.). For comparison, the same program using Bun.hash.crc32 : compiles in 100ms to 26.1 MB with: W”

GITHUB29d ago

“What version of Bun is running? 1.4.4+38afee6c8 ( oven/bun:1.4.4 slim ) What platform is your computer? Linux 6.6.87.2 microsoft standard WSL2 x86 64 unknown (Docker Desktop). The client is the Chromium of Playwright 1.56.1 ( mcr.microsoft.com/playwright:v1.56.1 noble , build chromium 1194 ) in a container on the same Docker network. What steps can reproduce the bug? A bare Bun.serve with http3: true and a self signed certificate. Chromium opens one fresh QUIC connection at a time to it (a new p”

GITHUBOct 28

“What version of Bun is running? 1.4.4 canary.1+aa1c7b96e , official Darwin arm64 PR build of commit aa1c7b96e564f9f7a36711bb692cd814ad17ddc2 from 45631. What is the issue? Compiling a dynamic import of a CommonJS module with sibling declarations panics in Lower: This reproduces with both compile aot and compile aot trim . It needs no dependencies, native addon, build plugin, or FFI call. Minimal reproduction Put these four files in an empty directory. package.json : main.mjs : library.js : libra”

GITHUBOct 27

“What version of Bun is running? 1.4.4, run over an existing install made by 1.4.3. What platform is your computer? macOS arm64. Also inferred on Vercel's Linux build image: 1.4.4 ran over a node modules restored from a 1.4.3 build (only 184 of 1,880 packages were installed), and the old store path appears in the production bundle's source maps. What steps can reproduce the bug? What is the expected behavior? After bun install , an entry in node modules/.bun that the install itself just stopped l”

GITHUBOct 23

“What version of Bun is running? 1.4.3+c6da4a4d3 (also 1.4.4 canary.1+5f5799ed1) What platform is your computer? Linux 7.0.0 38 generic x86 64 (Debian 13) What steps can reproduce the bug? bun check reports TS2589 on a typed $fetch call from nitropack's route types, where tsc 7.0.2 reports nothing. No dependencies are needed: the four files below are self contained. tsconfig.json : nitro fetch.d.ts : gen routes.ts (writes routes.d.ts with N synthetic routes): repro.ts : What is the expected behav”

GITHUBOct 17

“What version of Bun is running? 1.4.2 (Linux arm64). 1.4.0 produces correct output. What platform is your computer? Linux 6.12 aarch64 What steps can reproduce the bug? dep.js : index.js : What is the expected behavior? It prints 42 , as it does unbundled and when built with Bun 1.4.0. Bun 1.4.0 emits: What do you see instead? With 1.4.2, minify syntax inlines the lib binding into the object literal while lib is still read by a later property: Additional information The bug only appears when the”

GITHUBSep 24

“What version of Bun is running? 1.4.2 (also reproduced on 1.3.14) What platform is your computer? Linux — oven/bun:1.4.2 debian (glibc) and oven/bun:1.4.2 alpine (musl), both linux/amd64 and native linux/arm64. Not reproduced on macOS (1.4.0, arm64). What steps can reproduce the bug? A dynamic import() that triggers runtime auto install (no node modules in reach), reached concurrently by many Bun.serve requests before its promise is memoised. This is the shape of @better auth/core 's getOpenTele”

GITHUBSep 23

“What version of Bun is running? 1.4.3 canary.1+367d939d9, and main at 6d504dd983 (debug build). What platform is your computer? Linux x64. Cases 1 to 4 are in shared code. Case 1 also has a Windows arm ( $winSocketInfo ). What steps can reproduce the bug? A cluster worker asks the primary for a listen socket with an internal queryServer message. cluster. getServer(obj, options, cb) copies every key of options into that message ( src/js/internal/cluster/child.ts ). The primary handles four kinds”

GITHUBSep 23

“What version of Bun is running? 1.4.0 canary.1+4ca9ebc80 What platform is your computer? Darwin 25.5.0 arm64 arm What steps can reproduce the bug? Self contained repro — any registry package plus a patch that adds a file inside a directory that does not exist in the published package: What is the expected behavior? The patch applies and node modules/is odd/android/build/x/results.bin exists. What do you see instead? Additional information I hit this in a real React Native project with 6 patches”

GITHUBJul 6

“What version of Bun is running? Source verification against origin/main a9886150983872820ddf6db20433c6bf458c2f2f What platform is your computer? Linux 6.8.0 48 generic x86 64 x86 64 What steps can reproduce the bug? Pass a borrowed stack slice to the safe allocator free helper: What is the expected behavior? A safe deallocation API should require ownership/provenance of an allocation that came from the same allocator, or the raw deallocation entry point should be unsafe. What do you see instead?”

GITHUBJun 8

“What version of Bun is running? 1.3.14+0d9b296af What platform is your computer? Microsoft Windows NT 10.0.26200.0 x64 What steps can reproduce the bug? I am using bun for the purpose of creating/maintaining Vortex extensions they are extensions for the modding tool Vortex Mod Manager, making it easier for users to install mods for their favourite games. It has mostly been a pretty smooth process, except I've noticed that the optimizeImports setting does not appear to actually work. I am making”

GITHUBMay 20

“What version of Bun is running? oven/bun:1.3.12 alpine What platform is your computer? Ubuntu 24.04 LTS (64 bit) What steps can reproduce the bug? Even when I close all non system applications, Bun v1.3.12 freezes my whole system (32 GB DDR5 RAM). I am forced to hard reboot the machine. Additionally, I cannot build my full stack Nuxt 4 application (which has dozens of packages and heavy tree shaking). The build freezes during the Nitro step when using the environment variable NITRO PRESET=bun Wh”

GITHUBApr 11

“What version of Bun is running? 1.3.11 canary.1+9e93bfa1b What platform is your computer? Linux 5.10.0 12 amd64 x86 64 x86 64 What steps can reproduce the bug? Hi, I would like to report a behavior in Bun when running the below PoC: 1. test.mts 2. package.json 3. npm install 4. bun run test.mts What is the expected behavior? What do you see instead? Additional information No response”

GITHUBApr 4

“What version of Bun is running? v1.2.19 (aad3abea) What platform is your computer? Microsoft Windows NT 10.0.26100.0 x64 What steps can reproduce the bug? e0.ts e1.ts e2.ts Entrypoints e0.ts e1.ts What is the expected behavior? I'd expect everything to just work fine. What do you see instead? In the generated output of e0.js , the module ends up importing itself to get export e6, which returns undefined. Additional information No response”

GITHUBAug 2025

“What version of Bun is running? 1.0.3+25e69c71e70ac8a0a88f9cf15b4057bd7b2a633a What platform is your computer? Darwin 22.6.0 arm64 arm What steps can reproduce the bug? What is the expected behavior? Import succeeds and running the bundle completes without errors. What do you see instead? Additional information The bazel related log output is probably irrelevant, it results from a try catch statement where the catch block is likely supposed to run while developing selenium webdriver only. The im”

GITHUBSep 2023

“What version of Bun is running? 1.0.2+37edd5a6e389265738e89265bcbdf2999cb81a49 What platform is your computer? Darwin 22.4.0 arm64 arm What steps can reproduce the bug? What is the expected behavior? to throw an error (cuz integrity is invalid) What do you see instead? I get a response back. Additional information No response”

GITHUBSep 2023

SOLUTION LANDSCAPE

Brought to you byTop Sectors

A Player feature.See how many ways this pain can be solved, who's already building, and where the gaps are.

Related panes

/ same corner of the problem