Bun development tools fail when process exits
11 posts in the last 60 days, all from GitHub.
“What version of Bun is running? 1.4.3+c6da4a4d3 (also reproduces on 1.4.4 canary.1+5f5799ed1) What platform is your computer? Linux 7.0.0 38 generic x86 64 unknown What steps can reproduce the bug? When the shell for a package.json script cannot be spawned, bun run prints an…”
“What version of Bun is running? 1.3.14+0d9b296af What platform is your computer? Linux 7.0.0 27 generic x86 64 unknown What steps can reproduce the bug? If I have a Bun script that uses a timer, and then I put my machine into suspend, and then later resume the machine, the timer…”
“What version of Bun is running? 1.3.0+b0a6feca5 What platform is your computer? Microsoft Windows NT 10.0.26200.0 x64 What steps can reproduce the bug? Hi, I would like to report a behavior I observed while running the following code snippet: What is the expected behavior? It…”
Developers using Bun, a JavaScript runtime, find that calling `process.exit()` in watch mode unexpectedly terminates the entire Bun process, including the watcher itself. This requires manual restarts and disrupts workflow.
SOURCES (40)
“What version of Bun is running? 1.4.6 canary.1+c24943ad0 What platform is your computer? Microsoft Windows NT 10.0.26300.0 x64 What steps can reproduce the bug? I found this while checking whether a file watcher that keeps one recursive fs.watch per project root on Windows can count…”
“What version of Bun is running? 1.4.5 What platform is your computer? macOS (Darwin 25.6.0, arm64, 11 cores) What steps can reproduce the bug? Put the machine under CPU load (about 2x the core count of busy processes, for example yes /dev/null ), then run this test file repeatedly with bun test : What is the expected behavior? The child exits, close fires, and the test passes in well under a second every time. What do you see instead? Intermittently the first node:child process spawn in the bun”
“What version of Bun is running? 1.4.6 canary.1+b15f51302 What platform is your computer? Darwin 27.2.0 arm64 arm What steps can reproduce the bug? What is the expected behavior? doctor exits non zero, since bun lint stops on the same config ( error: 1 rule in .oxlintrc.json is not supported , exit 2, unless allow unsupported is passed). That way a script can use doctor as a compatibility check without parsing its text. doctor already exits 1 for an invalid rule option, and the open 47220 makes i”
“What version of Bun is running? 1.4.4+38afee6c8. The same code is on main . What platform is your computer? Darwin 25.6.0 arm64, macOS 26.7.3 What steps can reproduce the bug? If a 'data' handler on process.stdin calls pause() , removes itself and adds a 'readable' listener in the same tick, Bun stops reading stdin for good. This happens on a TTY and on a pipe. On a TTY, run bun repro.mjs , press a key, then press more keys. On a pipe, run this. The delay makes hello and world arrive as two chun”
“What version of Bun is running? 1.3.14+0d9b296af What platform is your computer? Linux 6.17.0 1016 oracle aarch64 (also reproduced on 1.3.12; not on 1.4.4) What steps can reproduce the bug? Under Bun 1.3.x, a program that repeatedly launches and closes Chromium through Playwright hangs forever: a pending page.evaluate (and later browser.close() ) never settles. The browser child process is already gone when this happens. Minimal repro ( repro.mjs , needs playwright 1.60.0 and a Chromium build; t”
“What version of Bun is running? Bun 1.4.4 (Linux x64). The exact revision was not recorded. Platform Debian 13.6, Linux 6.18.55, x86 64, inside a managed execution sandbox. Node.js 24.19.0 was used as a child process control. Behavior outside this sandbox has not been tested. Summary A Bun parent uses node:child process.spawnSync to capture a child's stdout. In the same child, fs.writeSync(1, 'S') is captured, but process.stdout.write('A', callback) fails with EPERM for Bun. A Node child reports”
“What version of Bun is running? 1.4,.3 (1.4+) What platform is your computer? Microsoft Windows NT 10.0.26300.0 x64 What steps can reproduce the bug? bun.exe version What is the expected behavior? show version (1.4.3) and exit What do you see instead? shows 1.4.3 and freezes Additional information same for help or other commands. The command gets executed but bun wont terminate. because of this even install wont run (shows 100% and freezes)”
“What version of Bun is running? 1.4.3+c6da4a4d3 (also reproduces on 1.4.4 canary.1+5f5799ed1) What platform is your computer? Linux 7.0.0 38 generic x86 64 unknown What steps can reproduce the bug? When the shell for a package.json script cannot be spawned, bun run prints an error but exits with status 0 . A script whose command line exceeds ARG MAX triggers it reliably ( posix spawn → E2BIG ): Output (same on 1.4.3 and 1.4.4 canary.1): stderr for bun run big ends with: What is the expected beha”
“What version of Bun is running? 1.4.3+c6da4a4d3, and 1.4.4 canary.1+6c1eb067e What platform is your computer? Linux 7.2.8 arch1 2 x86 64 What steps can reproduce the bug? What is the expected behavior? server exit code: null : the server is still listening, so its process keeps running whatever inspector clients come and go. What do you see instead? beforeExit fires in the server and the process exits with code 0 while Bun.serve is still listening, as if the event loop stopped counting the serve”
“What version of Bun is running? 1.4.3+c6da4a4d3 (stable); 1.4.4 canary.1+6c1eb067e behaves the same What platform is your computer? Linux 7.2.9 (WSL2) x86 64 What steps can reproduce the bug? What is the expected behavior? The same as Node (v26.11.1): ENOENT . With an empty PATH , ls is not found. What do you see instead? Other variants on Bun 1.4.3, from the same script with the line that sets the environment changed: | Setup | Node | Bun | | | | | | process.env.PATH = "" | ENOENT | ran | | pro”
“What version of Bun is running? 1.4.2+744846f84. Also reproduces on 1.4.3 canary.1+5749c3129. What platform is your computer? Linux 7.2.6 x86 64. Also seen on GitHub Actions ubuntu 22.04 runners. What steps can reproduce the bug? This is the full packages/ai suite (483 test files) of oh my pi, at a commit on our public fork RigelBuild/oh my pi. I don't have a small repro. The hang depends on how many files run in one process, and no single file triggers it. parallel implies isolate . With parall”
“What version of Bun is running? 1.4.3 canary.1+5f554969b What platform is your computer? Linux 7.0.0 31 generic x86 64 unknown What steps can reproduce the bug? A busy Worker keeps executing JavaScript for tens to hundreds of milliseconds after worker.terminate() is called. The same program on Node stops the worker within a few milliseconds. spin.js : the worker spins forever, stamping the time it last ran into shared memory: repro.js : measures how long the worker keeps running after terminate(”
“What version of Bun is running? 1.4.2+744846f84 What platform is your computer? Microsoft Windows NT 10.0.26200.0 x64 What steps can reproduce the bug? a simple vite dev server when terminated with "Ctrl + C" in windows, next run command gives the error the port is already in use and i can see the process still being alive. What is the expected behavior? process must be terminated What do you see instead? No response Additional information No response”
“What version of Bun is running? 1.3.14 (aarch64 apple darwin), also seen on 1.3.13 What platform is your computer? macOS 15.1, arm64 (M series). Also reproduces on GitHub's macos 14 runners. What steps can reproduce the bug? Spawn a PTY child via Bun.spawn(..., { terminal }) that exits on its own, and race a process group SIGTERM / SIGKILL against that exit. Within a few thousand iterations the process stops making progress entirely. What is the expected behavior? The loop runs to completion. Ra”
“What version of Bun is running? 1.4.2+744846f84 (also reproduced on 1.4.0 and 1.4.1) What platform is your computer? Microsoft Windows NT 10.0.26200.0 x64 What steps can reproduce the bug? repro.ts : The same happens with a file redirect ( bun run repro.ts < in.txt ) and with a parent that spawns the script with stdin: "pipe" and writes to it two seconds later — the child exits before the data arrives. What is the expected behavior? This is what Linux prints on 1.4.0, and what Windows prints on”
“What version of Bun is running? Bun 1.4.0 on Windows x64. What platform is your computer? Windows 11 x64. What steps can reproduce the bug? Create target.js : Create replace.js : In terminal 1: In terminal 2: On Windows this fails consistently with an error like: The same behavior occurs with: Controls tested on the same machine: bun target.js + the same rename(temp, target) succeeds. node watch target.js + the same atomic replacement succeeds (Node v26.8.1). Directly overwriting/truncating targ”
“What version of Bun is running? 1.4.0 (stable), macOS arm64 (Darwin 25.5.0) What steps can reproduce the bug? No minimal repro yet — filing with live captured evidence because the failure leaves no trace otherwise. Real world shape that reproduces at 3/8 full runs: bun test parallel=12 (implies isolate ) over a 205 file suite in a Bun + Turborepo monorepo, with turbo building/testing sibling packages concurrently (high host load at worker startup). Each test file's setup awaits one memoized init”
“What version of Bun is running? 1.3.14+0d9b296af (also reproduced on canary 1.4.0) What platform is your computer? Darwin 24.6.0 arm64 arm, Linux 6.18.9 talos x86 64 What steps can reproduce the bug? Under Bun, when the connection is TLS ( wss:// ) and the network path is dead (packets are silently dropped), terminate() moves the socket to readyState 2 (CLOSING) and the close event never fires. The socket stays in CLOSING indefinitely. Any code waiting on close to react to the termination hangs”
“What version of Bun is running? 1.4.0 canary.1 What platform is your computer? x64 What steps can reproduce the bug? // debugId=176A91D20735B3A564756E2164756E21 // sourceMappingURL=/chunk yhrkxxeb.js.map and those urls are exposed by the server. What is the expected behavior? it is expected that users should be able to enable or disable sourcemaps for production mode Bun.serve What do you see instead? I can see sourcemap in compiled chunks and i can access those sourcemaps from the server. Addit”
“What version of Bun is running? 1.3.14+0d9b296af What platform is your computer? Linux 7.0.0 27 generic x86 64 unknown What steps can reproduce the bug? If I have a Bun script that uses a timer, and then I put my machine into suspend, and then later resume the machine, the timer will not continue. It doesn't matter which method I use to implement the timer all these three implementations exhibit the issue: setInterval: setTimeout: Bun.sleep What is the expected behavior? After I resume the machi”
“What version of Bun is running? 1.4.0 canary.1+98094dc4d What platform is your computer? Darwin 24.6.0 arm64 arm What steps can reproduce the bug? Calling process.exit() in watch mode terminates Bun entirely including the watcher itself. This makes it difficult to develop and test CLIs & scripts with Bun where you need to work with cases like this since I'd have to manually restart every time. For example: What is the expected behavior? The watcher should remain active when the process exists an”
“What version of Bun is running? 1.3.14+0d9b296af What platform is your computer? Linux 6.8.0 124 generic x86 64 x86 64 What steps can reproduce the bug? create file test.js and file ./helpers/script.js then run bun test.js What is the expected behavior? Node.js outputs What do you see instead? Bun outputs which is the opposite order Additional information No response”
“What version of Bun is running? 1.3.14+0d9b296af What platform is your computer? Linux 6.8.0 124 generic x86 64 x86 64 What steps can reproduce the bug? What is the expected behavior? Node.js prints received { foo: 'bar' } and then hangs What do you see instead? Bun outputs and then exits immediately Additional information No response”
“What version of Bun is running? 1.4.0 canary.1+7069b3092 (also reproduces on 1.3.14+0d9b296af ) What platform is your computer? Microsoft Windows NT 10.0.26200.0 x64 What steps can reproduce the bug? Complete, runnable reproduction: https://github.com/BlackHole1/bun detached windows bug ( pwsh run.ps1 runs it and reports whether each spawned helper survived the parent's exit; includes a passing cmd /c start workaround variant and a multi run stability check.) The bug in one file — on Windows, a”
“What version of Bun is running? 1.3.14 canary.1+d5945cffa What platform is your computer? Linux 6.12.86+deb13 amd64 x86 64 x86 64 What steps can reproduce the bug? Hi, I would like to report a behavior in Bun that can be reproduced using the below snippet: What is the expected behavior? HELLO WORLD What do you see instead? Additional information No response”
“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 that can be reproduced using the below PoC: 1. worker.mjs 2. foo.mjs 3. package.json 4. npm install 5. bun run foo.mjs What is the expected behavior? Print 10 and exit What do you see instead? Prints 10 and does not finish execution Additional information No response”
“What version of Bun is running? 1.3.6+d530ed993 What platform is your computer? Microsoft Windows NT 10.0.19045.0 x64 What steps can reproduce the bug? 1. Create sample HTML file and save it as test.html 2. Start Bun local server via bun test.html 3. Press o + Enter to open localhost:3000 in web browser 4. Bun tries to execute non existent executable start and terminates itself What is the expected behavior? If everything works as expected, Bun should create new process of web browser that opens”
“What version of Bun is running? 1.3.7 canary.49+f833f11af What platform is your computer? Linux 5.15.0 164 generic x86 64 x86 64 What steps can reproduce the bug? What is the expected behavior? What do you see instead? Additional information MySQL server version: 8.0.44 0ubuntu0.22.04.2 OS: Ubuntu 22.04.5 LTS Mysql2 has no problems with auth using caching sha2 password , and I can connect with the same credential via phpMyAdmin and mysql CLI as well. If I change the auth plugin to mysql native p”
“What version of Bun is running? 1.3.3+274e01c73 What platform is your computer? Mac / Linux What steps can reproduce the bug? I've recently started having bun silently stop running scripts half way through exit code 0. with no errors it just stops as if the code has fully run and finished although its half way through. I notice it on long running tasks. It also does not consistency happen at the same point in code execution. The code runs fine on Node. I've tried had it on multiple projects and”
“What version of Bun is running? 1.3.0 What platform is your computer? Microsoft Windows NT 10.0.26200.0 x64 What steps can reproduce the bug? 1. Install dependencies: 2. Create a test file: 3. Run with Bun: What is the expected behavior? Should read barcodes from the image and print results, or throw an error before the last line executes. What do you see instead? Bun exits silently after "Read image data from..." log. No error is thrown, the process just terminates. This happens non determinist”
“What version of Bun is running? 1.3.0+b0a6feca5 What platform is your computer? Microsoft Windows NT 10.0.26200.0 x64 What steps can reproduce the bug? Hi, I would like to report a behavior I observed while running the following code snippet: What is the expected behavior? It should print done and exit as in Node What do you see instead? Prints done and does not exit This issue was previously reported in 19563 and was closed saying that it was fixed in the latest Canary version but I observe tha”
“What version of Bun is running? 1.2.19+aad3abead What platform is your computer? Microsoft Windows NT 10.0.26100.0 x64 What steps can reproduce the bug? Discrovered in a monorepo project using Bun with a structure like this: I use the following command from the root package.json: Steps to reproduce: 1. Clone a Bun monorepo project with separate client/ and server/ folders. 2. Add the above root script that uses bun cwd <dir run dev inside concurrently. 3. Start with bun dev . 4. Press Ctrl+C. 5.”
“What version of Bun is running? 1.1.34 What platform is your computer? Darwin 23.6.0 arm64 arm What steps can reproduce the bug? When I run a file with bun from the terminal, both readline and process.stdout.write work correctly. But when I do it from the VSCode debug console with the Bun extension, all inputs are completely skipped and it doesn't wait for me to type user input. This is an issue with VSCode debugger not supporting user input in general (for node as well). With node.js, VSCode su”
“What version of Bun is running? 1.1.38 What platform is your computer? x64 What steps can reproduce the bug? Very simple code, it works fine in nodejs, but it doesn't run in bunjs. It doesn't report any errors, but it gets stuck and there is no output. Image What is the expected behavior? Run it normally What do you see instead? No output, always stuck Additional information No response”
“What version of Bun is running? 1.1.38+bf2f153f5 What platform is your computer? Linux 6.6.58 x86 64 unknown What steps can reproduce the bug? What is the expected behavior? What do you see instead? Additional information No response”
“What version of Bun is running? 1.1.36 What platform is your computer? windows 11 x64 What steps can reproduce the bug? As a passionate supporter of Bun, I hope these issues can be resolved quickly, as I have a high demand project waiting to proceed. Below are the two main problems I’ve encountered: When using Bun version 1.1.34 with the latest version of Axios , certain URLs caused the process to hang indefinitely. This issue ignored try catch blocks and timeout settings, and the process would”
“What version of Bun is running? 1.1.29 What platform is your computer? macOS What steps can reproduce the bug? got a bun test script, then open a javascript debug console in VSC, then bun inspect test <my test set a breakpoint somewhere and hit the breakpoint. then click on the disconnect icon on the debug control bar. What is the expected behavior? The debugger in VSC properly disconnects from the current session. What do you see instead? The debugger still runs in the attached mode. Many sessi”
“What version of Bun is running? 1.1.26+0a37423ba What platform is your computer? Linux 6.8.0 40 generic x86 64 x86 64 What steps can reproduce the bug? 1. Input this code into bun cluster.mjs file: 2. Run the code in watch mode: 3. Press Ctrl+C and see that process still work.”
“What version of Bun is running? 1.1.10+5102a9443 What platform is your computer? Microsoft Windows NT 10.0.19045.0 x64 What steps can reproduce the bug? main.ts package.json What is the expected behavior? The following printed to stdout on interrupt (Ctrl+C) when either of the following commands is ran: bun main.ts bun start What do you see instead? When running bun main.ts , the output is correct. When running bun start , the output is either empty or truncated. Additional information Invoking”
“What version of Bun is running? 1.0.2+37edd5a6e389265738e89265bcbdf2999cb81a49 What platform is your computer? Darwin 22.5.0 arm64 arm What steps can reproduce the bug? I wrote a custom loader (plugin) to support importing .scss files. The loader is working as expected but when using bun watch , the imported .scss file does not rerun the process on save. You can reproduce by doing the following: Create a .scss file styles.scss Create a plugin sassLoader.js (and preload the plugin in bunfig.toml”
