Bun install breaks Vite/SvelteKit projects after adding dependencies
37 posts since Sep 2023, all from GitHub.
“What version of Bun is running? 1.3.9+cf6cdbbba What platform is your computer? Linux 6.6.87.2 microsoft standard WSL2 x86 64 What steps can reproduce the bug? Creating a React application with CodeMirror and yamlSchema extension causes the application to crash because those…”
“What version of Bun is running? 1.3.1+89fa0f343 What platform is your computer? Ubuntu 24.04.3 What steps can reproduce the bug? This is a complex Vite/TanstackStart app. Everything works on 1.3.0 but the Vite build/TanstackStart pre generation fails. What is the expected…”
“What version of Bun is running? 1.3.0+b0a6feca5 What platform is your computer? Darwin 25.0.0 arm64 arm What steps can reproduce the bug? Clone the reproduction repository: https://github.com/Paultje52/bun vite sveltekit problem Install the dependencies using bun install and…”
Users report that running `bun install` or `bun add` in SvelteKit projects causes Vite to fail loading the config, leading to deployment failures. The issue persists across multiple Bun versions and platforms.
SOURCES (37)
“What version of Bun is running? Reproduces on all of: 1.3.14+0d9b296af 1.4.4+38afee6c8 (latest stable) 1.4.4 canary.1+da867c60b (canary) What platform is your computer? Darwin 25.6.0 arm64 arm (macOS). Node v26.13.0 was used for the comparison runs. What steps can reproduce the bug? A module imports a…”
“What version of Bun is running? 1.4.4+38afee6c8 (also 1.4.4 canary.1+a8fcd319b; 1.4.2+744846f84 is correct) What platform is your computer? Darwin 24.6.0 arm64 unknown What steps can reproduce the bug? With splitting: true and minify: true (its syntax pass), export from a CommonJS package gives the entry no static named exports. Bun 1.4.2 gave it every name. entry.js other.js (a second entry, so splitting emits a shared chunk) build.ts In an empty directory: What is the expected behavior? true ,”
“Found while running release gates for 699. core/ has a package.json with no devDependencies , no scripts , and no node modules , so the script exits: Reproduces on a clean next checkout, so it is not release specific. It is also not what CLAUDE.md documents — that says core runs under bun:test ( bun test ./core/src/ ), which is green (1456 pass / 0 fail across 51 files). Only web/ui needs vitest. Fix is probably to redefine test:core as bun test ./core/src/ (and, if a vitest core suite is wanted”
“What version of Bun is running? 1.4.0+34cbb9a40 What platform is your computer? Linux 6.18.33.2 microsoft standard WSL2 x86 64 x86 64 What steps can reproduce the bug? 1. Create 3 files: package.json app1/package.json package1/package.json 2. run bun install 3. run bun prune or bun dedupe What is the expected behavior? bun prune or bun dedupe should not fail, because the lockfile does not match the package.json What do you see instead? Additional information bun install generates this lockfile b”
“What version of Bun is running? 1.4.0 What platform is your computer? Darwin 25.3.0 arm64 arm What steps can reproduce the bug? Use the attached minimal fixture. It has this dependency graph: All three package.json files exist. There are no lifecycle scripts, registry dependencies, workspaces, or lockfiles. Run: The script runs Bun 1.3.14 and 1.4.0 from clean temporary directories. The equivalent failing command is: Fixture: bun 1.4 transitive file dependencies repro.zip What is the expected beh”
“What version of Bun is running? v1.3.14 (Linux x64 baseline) What platform is your computer? Debian x64 What steps can reproduce the bug? Install a package that relies on dynamic execution loaders (e.g., playwright or css tree). Attempt to pack the server entry point into an isolated monolith using the inline configuration: Move the index.js bundle away from the workspace (or rename/delete node modules). Execute the binary script: bun ./index.js help What is the expected behavior? When compiling”
“What version of Bun is running? 1.4.0 canary.1+5ac120ca3 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 Deno that can be reproduced using the below snippet: What is the expected behavior? Should not throw error What do you see instead? Bun throws error Error also does not mention function name or package name Additional information Reference documentation: https://bun.com/reference/node/module/def”
“What version of Bun is running? 1.3.9+cf6cdbbba What platform is your computer? Linux 6.6.87.2 microsoft standard WSL2 x86 64 What steps can reproduce the bug? Creating a React application with CodeMirror and yamlSchema extension causes the application to crash because those dependencies: json schema library @sagold/json query@6.2.0 ebnf The issue is in the generated file, that converts the following import (@sagold/json query/dist/module/lib/parser/index.js): into an object that contains someth”
“What version of Bun is running? 1.3.5+1e86cebd7 What platform is your computer? Windows ARM64 VM running on M4 macbook What steps can reproduce the bug? 1. clone electrobun 2. cd into /package 3. run bun dev another repro is to just try run claude code after installing windows update KB5074109 What is the expected behavior? bun dev should vendor and setup everything you need, build all electrobun binaries, and run the kitchen sink (integrated test suite). What do you see instead? exit code 5 whe”
“What version of Bun is running? 1.3.1+89fa0f343 What platform is your computer? Darwin 25.0.0 arm64 arm What steps can reproduce the bug? when ported from vite to bun.. some of the function not working What is the expected behavior? it should work What do you see instead? but seeing error <img width="1501" height="762" alt="Image" src="https://github.com/user attachments/assets/4ca606fa 61b2 486f 9221 49e2984d271c" / Additional information No response”
“What version of Bun is running? 1.3.1+89fa0f343 What platform is your computer? Ubuntu 24.04.3 What steps can reproduce the bug? This is a complex Vite/TanstackStart app. Everything works on 1.3.0 but the Vite build/TanstackStart pre generation fails. What is the expected behavior? Should pre render without issue What do you see instead? Additional information I don’t think it has anything to do with the specifics of my code, I think there is just an incompatibility with react dom.”
“What version of Bun is running? 1.3.0+b0a6feca5 What platform is your computer? Darwin 25.0.0 arm64 arm What steps can reproduce the bug? Clone the reproduction repository: https://github.com/Paultje52/bun vite sveltekit problem Install the dependencies using bun install and then start the vite dev server using bun run dev . What is the expected behavior? The vite development server should start properly and when navigating to http://localhost:5173 you should see a hello world page. The page sho”
“What version of Bun is running? 1.2.21 What platform is your computer? Widows 11 What steps can reproduce the bug? Each time I run the vite react code with bun run dev after bun create vite@latest and bun install What is the expected behavior? To run the vite react program What do you see instead? error: could not create process Bun failed to remap this bin to its proper location within node modules. This is an indication of a corrupted node modules directory. Please run 'bun install force' in t”
“What version of Bun is running? 1.2.19+aad3abead What platform is your computer? Darwin 24.3.0 arm64 arm What steps can reproduce the bug? use "nuxt": "^3.17.5", then "dev": "bun bun nuxt dev", What is the expected behavior? no error message What do you see instead? <img width="848" height="230" alt="Image" src="https://github.com/user attachments/assets/f4b9c654 e67a 4b70 96c2 e038ce845520" / Additional information No response”
“What version of Bun is running? 1.2.16 What platform is your computer? Darwin 24.5.0 arm64 arm What steps can reproduce the bug? Clone the repo: https://github.com/sharunkumar/orval bun install bug repro npm install + npx orval succeeds bun install + bunx bun orval fails note: makefile helper scripts available with the exact steps error details are present in the readme of the repo, but this seems to be more of a module resolution discrepancy bug between npm/bun, because npm install + bunx bun o”
“What version of Bun is running? 1.2.8 What platform is your computer? Windows 11 What steps can reproduce the bug? 1. Create a minimal program that uses the header generator module. 2. Compile for bun windows x64 modern target. 3. Execute the binary. What is the expected behavior? The binary should work, as the program works if run through bun index . What do you see instead? Additional information No response”
“What version of Bun is running? No response What platform is your computer? No response What steps can reproduce the bug? dockerfile is vite.config.ts is it's simple remix.run app What is the expected behavior? No response What do you see instead? No response Additional information No response”
“What version of Bun is running? 1.2.4 What platform is your computer? windows wsl ubuntu 2404 x64 What steps can reproduce the bug? in a type:"module" project, import some cjs lib, like "@colyseus/tools": "^0.15.49" . when i run bun index.ts, it run normal. But after run build. i'll got error laike Tools.default is not a function . when i console Tools.default , i get {default: [Getter]} . build.ts What is the expected behavior? No response What do you see instead? No response Additional informa”
“What version of Bun is running? All versions for the past half of year, currently on 1.2.1 still occurs What platform is your computer? Darwin 24.1.0 arm64 arm but it appears that this also happens on WSL What steps can reproduce the bug? 1. Create sveltekit project with bun 2. Install all dependencies 3. Run it once, Vite caches dependencies 4. Install new dependency via bun install or bun add or bun remove (or aliases) 5. Now when you try to run bun dev you'll get: What is the expected behavio”
“What version of Bun is running? 1.1.43 canary.84+189684f17 What platform is your computer? Darwin 24.2.0 arm64 arm What steps can reproduce the bug? I am creating a wrapper around Vite and Tailwind for a project where I need to call them on a single HTML file in a .NET program. But trying to compile my cli wrapper produces this error after compilation. The compilation itself runs fast and fine. Does Bun not include assets from modules or consider them? at node modules/vite/dist/node/constants.js”
“What version of Bun is running? 1.1.36 What platform is your computer? Linux 6.6.52 x86 64 unknown What steps can reproduce the bug? I use this guide: https://bun.sh/guides/ecosystem/vite And install element plus: Add volar support restart vite server What is the expected behavior? Fast start up, appropriate consumption RAM What do you see instead? I wait 2 3 minutes. In btop, I see how the node process loads 1 core by 100% (sometimes 2 by 50%). The amount of memory used is constantly increasing”
“What version of Bun is running? 1.1.30 What platform is your computer? Darwin 24.0.0 arm64 arm What steps can reproduce the bug? In my turborepo project, when I run bun build ./src/index.ts outdir ./dist target bun in my final project, it breaks one of my file as follow: Original file from my dependency @react email/tailwind from react email (already built and minified in node modules). For a better readability I've found the original function in balanced match . This is what bun is giving me as”
“What version of Bun is running? 1.1.29+6d43b3662 What platform is your computer? Microsoft Windows NT 10.0.22631.0 x64 What steps can reproduce the bug? I was working on an API with bun 1.26, then I updated bun and the project does'nt work anymore. It always shows an error message saying Cannot find module... even I install those dependencies. Some of the folders in node modules are empty too when I try to install dependencies. What is the expected behavior? No response What do you see instead?”
“What version of Bun is running? 1.1.28 canary.54+0a6594395 What platform is your computer? Darwin 23.6.0 arm64 arm What steps can reproduce the bug? Create a Bun project Install konk (this is my own package, it has a preinstall script that installs a platform specific binary): bun add konk trust Note that the binary is missing. Run bun install The binary is now present What is the expected behavior? The binary would be installed when the package is added the first time. What do you see instead?”
“What version of Bun is running? 1.1.18+5a0b93523 What platform is your computer? Linux 6.5.0 18 generic x86 64 x86 64 What steps can reproduce the bug? 1. Clone https://github.com/huseeiin/bun vite bug 2. Run bun bun dev 3. Now to make it work in node, run bun dev What is the expected behavior? What do you see instead? Additional information No response”
What version of Bun is running? 1.1.4+fbe2fe0c3 What platform is your computer? Microsoft Windows NT 10.0.19045.0 x64 What steps can reproduce the bug? I created a project a week ago using bun…
“What version of Bun is running? 1.1.3+2615dc742 What platform is your computer? Microsoft Windows NT 10.0.19045.0 x64 What steps can reproduce the bug? Sorry for bad english. 1. Install and import modules pino and pino pretty (we may skip import pino pretty, both cases will fail) 2. Set pino transport to pino pretty 3. Compile ( bun build app.js compile outfile app.exe target bun ) 4. Run and get crashed What is the expected behavior? Logger should work as normally and output text to console Wha”
“What version of Bun is running? 1.2.19 What platform is your computer? Darwin 23.3.0 arm64 arm What steps can reproduce the bug? Add the import and modify the config into bun.config.js : Console output: Which is referring to import "./ / .js"; What is the expected behavior? https://github.com/excid3/esbuild rails/issues/23 Compiling without error and showing us the console.log in the browser. Is it on your roadmap to implement those or need additional informations ? What do you see instead? No r”
“What version of Bun is running? 1.0.27+c34bbb2e3 What platform is your computer? Darwin 23.2.0 arm64 arm What steps can reproduce the bug? I was trying to make a small lambda with tfjs, so I wanted to bundle it to make the size small. index.ts run build command: run bundled lambda: Error: I can reproduce this error message by removing import '@tensorflow/tfjs backend cpu'; from index.ts . It seems like this import line does not get resolved correctly or is somehow omitted from the bundled js. Wh”
“What version of Bun is running? 1.0.26 canary.31+2f8f77eeb What platform is your computer? Microsoft Windows NT 10.0.22631.0 x64 What steps can reproduce the bug? Follow the instructions on https://bun.sh/guides/ecosystem/vite Run bun create vite my app What is the expected behavior? What do you see instead? Additional information No response”
What version of Bun is running? 1.0.21+837cbd60d What platform is your computer? Oficial docker image What steps can reproduce the bug? I have been experiencing a bug where after I run: The…
“What version of Bun is running? 1.0.18+36c316a24 What platform is your computer? Darwin 23.2.0 arm64 arm What steps can reproduce the bug? When trying to use it directly such as server side rendering, no errors but when trying to bundle it (to either target Bun or Browser) you get Element type is invalid: expected a string (for built in components) or a class/function (for composite components) but got: object. bun run index.tsx and visit the server, no error. Then bun build index.tsx target=bun”
“What version of Bun is running? 1.0.17+5e60861c3 What platform is your computer? Linux 6.1.66 1 lts x86 64 unknown What steps can reproduce the bug? with vscode auto save enabled, holding down a key like 1 (what i did that crashed it: <h1 Hello World11111111111111111111111111111111111111111111111111</h1 ). this will crash the hmr first. after refreshing the page the whole server will crash. What is the expected behavior? No response What do you see instead? No response Additional information No”
“What version of Bun is running? 1.0.13 What platform is your computer? Vercel Deploy What steps can reproduce the bug? Astro v3.5.5 @astrojs/vercel^5.2.0 astro.config.mjs The problem is at the time of execution of bun install , bun install is executed without error but after executing the build of the project, send the above mentioned error What is the expected behavior? Normal installation and correct operation in vercel What do you see instead? Deployment fails and it is necessary to switch to”
“What version of Bun is running? 1.0.7+b0393fba6200d8573f3433fb0af258a0e33ac157 What platform is your computer? Darwin 23.1.0 arm64 arm What steps can reproduce the bug? Another edge case: https://github.com/oven sh/bun/issues/6854 issuecomment 1824461079 Screenshot 2023 11 02 at 4 16 20 AM Leading string removed by bun build and Bun.build(...) : What is the expected behavior? Without minify , this string shouldn't be removed. What do you see instead? The string is removed. Additional information”
“What version of Bun is running? 1.0.4+745b6b94ee56cad24d475799690cc9a89957d15b What platform is your computer? Darwin 22.6.0 arm64 arm What steps can reproduce the bug? See repository https://github.com/multivac61/bun cpp lib What is the expected behavior? No response What do you see instead? No response Additional information No response”
“What version of Bun is running? 1.0.0+822a00c4d508b54f650933a73ca5f4a3af9a7983 What platform is your computer? Darwin 22.6.0 arm64 arm What steps can reproduce the bug? Create noopPlugin.ts : Configure the plugin in bunfig.toml: Install example package: @pnpm/read project manifest Create an example file test file: Run bun test . What is the expected behavior? Test passes. The plugin just loads the contents of the file and passes them forward to Bun's internal loader. It should work the same way”
