Bun users encounter errors with TypeScript and web push
16 posts in the last 60 days, all from GitHub.
“What is the problem this feature would solve? bun lint runs version 8 of the typescript eslint rules, even when typescript eslint 7 is installed: Two type aware rules that are still in typescript eslint 7 were removed in 8, each with a direct replacement: | v7 rule (removed in…”
“What version of Bun is running? 1.4.6 canary.1+25c4fca9e (npm bun@1.4.5 canary.20261122.1 ) What platform is your computer? Linux 6.12 x86 64 What steps can reproduce the bug? package.json devDependencies: eslint@8.57.1 , eslint plugin jest dom@5.5.0 . .eslintrc.json…”
“What is the problem this feature would solve? With an .oxlintrc.json config, bun lint lints the”
Multiple users report encountering errors when using Bun, including issues with TypeScript compatibility, problems importing web push libraries, and unexpected behavior with CSS observers. These issues range from type errors to failed imports and rendering problems.
SOURCES (31)
“TypeScript: Uint8Array setFromBase64 has the wrong second parameter type What version of Bun is running? 1.4.5+a7733435c What platform is your computer? Darwin 25.6.0 arm64 arm What steps can reproduce the bug? bun types/globals.d.ts declares: The runtime expects the TC39 options bag, not a number: Passing…”
“What is the problem this feature would solve? bun lint runs version 8 of the typescript eslint rules, even when typescript eslint 7 is installed: Two type aware rules that are still in typescript eslint 7 were removed in 8, each with a direct replacement: | v7 rule (removed in v8) | v8 replacement | | | | | @typescript eslint/no throw literal | @typescript eslint/only throw error | | @typescript eslint/no useless template literals | @typescript eslint/no unnecessary template expression | Shared”
“What version of Bun is running? 1.4.6 canary.1+25c4fca9e (npm bun@1.4.5 canary.20261122.1 ) What platform is your computer? Linux 6.12 x86 64 What steps can reproduce the bug? package.json devDependencies: eslint@8.57.1 , eslint plugin jest dom@5.5.0 . .eslintrc.json : repro.test.js : What is the expected behavior? The same result as ESLint 8, which reports the problem and exits 1: What do you see instead? The whole run stops with exit 2 (no fix passed): Additional information The rule's fixer p”
“What happens Bun loads import "./x.css" and import styles from "./y.module.css" , but bun types declares neither, so TypeScript 6 rejects both: (TS2882 comes from noUncheckedSideEffectImports , on by default in TypeScript 6.) bun types does declare .html , .toml , .yaml , .yml , .txt , .jsonc , .json5 , .xml and /bun.lock . Every package or app that imports CSS needs its own declare module " .css" . Expected bun types declares the CSS modules Bun's loader supports, matching bun init 's bun env.d”
“What version of Bun is running? 1.4.4+38afee6c8 What platform is your computer? Darwin 27.0.0 arm64 arm What steps can reproduce the bug? bun check reports a false TS2322 on an object literal argument, inside a loop, when the loop reassigns a narrowed variable from a call that takes that variable: The literal 'place' is checked as string , as if the argument had no contextual type. tsc 6.0.3 and 7.0.2 both accept the project. repro.ts tsconfig.json Run these commands. The tsc is typescript@7.0.2”
“What version of Bun is running? 1.4.4 (stock release) What platform is your computer? Linux x64: WSL2 (8 cores) and GitHub Actions ubuntu 24.04 What steps can reproduce the bug? I don't have a public reproduction yet. The program is a private application, and two attempts to rebuild the shape from public packages (a recursive conditional type; a generated Elysia app of up to 90 plugins with 60 routes each) didn't trigger it. I'm filing with what I measured because it has now failed a CI run, and”
“What is the problem this feature would solve? With an .oxlintrc.json config, bun lint lints the <script of a .vue file, but a type aware rule reports nothing in it, and a .ts file that imports from it gets no type for that import. In my project this is why the typed rules on .vue files (typescript eslint's strictTypeChecked ) still run through ESLint, typescript eslint and vue eslint parser. TypeScript 7.1 content mappers give the checker a .vue file as TypeScript, and vize and @vue/content mapp”
“What version of Bun is running? 1.4.4+38afee6c8 (official npm @oven/bun darwin aarch64@1.4.4 binary). The behavior below was tested on that release binary, not a locally built main. What platform is your computer? macOS 26.6.2, arm64: What steps can reproduce the bug? Save as repro.cjs and run with bun repro.cjs and node repro.cjs : What is the expected behavior? Node.js v24.19.0 returns the string conversion and calls toString first: What do you see instead? Bun 1.4.4 uses the default hint conv”
“What version of Bun is running? 1.4.4 canary.1+bdb047173. The same with 1.4.4+38afee6c8. What platform is your computer? Darwin 27.0.0 arm64 arm What steps can reproduce the bug? package.json : tsconfig.json : a.ts : Then run bun install , bun check no script and tsc p . . What is the expected behavior? No errors. tsc 7.0.2 and 5.9.3 both exit 0. What do you see instead? The error on line 6 has the same chain, one level deeper, because the group style function takes GroupProps as a parameter. Ad”
“What version of Bun is running? 1.4.4+38afee6c8 (Linux x64) What platform is your computer? No response What steps can reproduce the bug? The attached project is a single HTML page and TypeScript module. No dependencies. 1. Open http://127.0.0.1:39623/ and DevTools → Sources. 2. In src/main.ts , change the string "AAA" to "BBB" and save. 3. Repeat with "CCC" , "DDD" , "EEE" . 4. Use the Pause in debugger button to inspect the source after each update. What is the expected behavior? Each HMR patc”
“What version of Bun is running? 1.4.4+38afee6c8 What platform is your computer? Darwin 25.3.0 arm64 What steps can reproduce the bug? package.json tsconfig.json src/index.ts | checker | result | | | | | tsc 7.0.2 | exit 0 | | tsc 7.1.0 beta | exit 0 | | tsc 6.0.3 | exit 0 | | bun check 1.4.3+c6da4a4d3 | No type errors | | bun check 1.4.4+38afee6c8 | TS2322 (below) | What is the expected behavior? What tsc 7.0.2 reports, which is no errors. The docs say bun check "aims to report exactly what tsc”
“What happened bun check 1.4.4 reports two errors on a plain drizzle orm withReplicas(primary, [replica]) call. tsc 7.0.2 with the same tsconfig accepts it, and so does bun check 1.4.3. Canary 1.4.4 canary.1+a8fcd319b still reproduces. | checker | result | | | | | tsc noEmit 7.0.2 | exit 0 | | bun check 1.4.3 | No type errors in 1 file | | bun check 1.4.4 | TS2322 + TS2345 | | bun check canary 1.4.4 canary.1+a8fcd319b | TS2322 + TS2345 | bun check appears to widen the type parameter Q of withRepl”
“What version of Bun is running? 1.4.4 canary.1+963452075 (also reproduces on 1.4.3) What platform is your computer? Darwin 25.6.0 arm64 arm What steps can reproduce the bug? bun check infers a callback's return type as unknown when that callback's parameter type is an interface whose type parameter defaults to an object spread of a @supabase/supabase js select result. tsc 7.0.2 infers boolean . The only dependency is @supabase/supabase js , which is used for its select query result type. I could”
“What version of Bun is running? 1.4.3+c6da4a4d3 (also 1.4.4 canary.1+963452075) What platform is your computer? Microsoft Windows NT 10.0.26200.0 x64 What steps can reproduce the bug? repro.ts : tsconfig.json : Run bun check in that directory, and tsc p . with TypeScript 7.0.2 (the version process.versions.typescript reports for this Bun). What is the expected behavior? No errors, as with tsc 7.0.2: make(1).current is number . What do you see instead? Additional information The getter's type kee”
“What version of Bun is running? 3.4.3 What platform is your computer? Microsoft Windows NT 10.0.26200.0 x64 What steps can reproduce the bug? bun add web push OK In a file: import webpush from 'web push' Not imported. What is the expected behavior? No response What do you see instead? In VScode the word 'web push' is red underlined. Additional information No response”
“What version of Bun is running? Reproduced on both: 1.4.3+c6da4a4d3 1.4.2+744846f84 What platform is your computer? Darwin 25.3.0 arm64 arm ( uname mprs ) Browser: Chromium 153.0.8010.12 , driven with Playwright. What steps can reproduce the bug? Create these four files in an empty directory. No dependencies or framework are needed. server.ts : index.html : style.css : client.ts : Run bun server.ts , open http://localhost:34143/ , and click the button. The image files do not need to exist: the e”
“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 Node that can be reproduced by running the below snippet What is the expected behavior? Position argument must be a number and error should be thrown What do you see instead? Does not throw even in strict mode Additional information This was also reported to Node as an issue https://github.com/node”
“What version of Bun is running? 1.3.8+b64edcb49 What platform is your computer? Darwin 25.2.0 arm64 arm What steps can reproduce the bug? server.ts : then bun server.ts . What is the expected behavior? HTTP server should launched where the stop method shouldn't affect that. What do you see instead? No output, program exited successfully. Additional information Elysia's app instance provided a stop method as its own property, which blocks export default new Elysia()... to work.”
“What version of Bun is running? 1.3.5 What platform is your computer? Linux 6.6.87.2 microsoft standard WSL2 x86 64 x86 64 What steps can reproduce the bug? The file uses Bun macros: typescript import { data } from "./models macro" with { type: "macro" } Running bun conditions=browser src/index.ts crashes on first attempt, works on second. What is the expected behavior? Bun should successfully transpile and run the TypeScript file with macro imports without crashing. The command should execute n”
“What version of Bun is running? 1.2.23+cf1367137 What platform is your computer? Linux 6.6.87.2 microsoft standard WSL2 x86 64 x86 64 What steps can reproduce the bug? 1\. Prepare the following files asset.ts frontend.ts index.html index.ts 2\. Run bun run index.ts 3\. Open localhost:3000 in browser 4\. Save asset.ts What is the expected behavior? The following content should be displayed in the DevTools console. What do you see instead? The following will be displayed on the DevTools console. A”
“What version of Bun is running? 1.2.6+8ebd5d53d What platform is your computer? Darwin 24.3.0 arm64 arm What steps can reproduce the bug? What is the expected behavior? What do you see instead? Additional information Node says the variable does not exist because the block of code where it was declared was never entered, Bun happily logs the variable that should not exist. I could see this causing issues for people. This did not cause me any issues I just found the difference to be surprising.”
“What version of Bun is running? 1.2.5 What platform is your computer? Linux a228628fd653 6.6.31+rpt rpi 2712 unknown What steps can reproduce the bug? create a website using drizzle orm + bun:sql , run for a day What is the expected behavior? the PostgresSQLConnection Object should be freed, at least not this much. What do you see instead? Image Additional information I do check from the postgres database, there is no active connection from the website, those connection already closed Update: Af”
“What version of Bun is running? 1.2.2 What platform is your computer? MacOS What steps can reproduce the bug? When I run my typescript code What is the expected behavior? No error (there is no error in nodejs) What do you see instead? Additional information When I changed to this, no error”
“What version of Bun is running? 1.1.30 What platform is your computer? Darwin 22.3.0 arm64 arm What steps can reproduce the bug? Create a simple typescript file: Build the file with the target of node What is the expected behavior? I would expect Bun.env to be transformed into process.env , so that node can handle env vars passed in What do you see instead? The build has calls to Bun.env Additional information No response”
“What version of Bun is running? 1.1.29 canary.12+c298b23c4 What platform is your computer? Darwin 24.0.0 arm64 arm What steps can reproduce the bug? Repro here: https://github.com/birkskyum/jest config ts Just a small jest/ts node/ts jest starter with a jest.config.ts and a sum / sum.test file. What is the expected behavior? I'd expect bun bun run test to pass the test like bun run test and npm run test does What do you see instead? Additional information No response”
“What is the problem this feature would solve? Given this: bun build test.ts with "verbatimModuleSyntax": true should throw an error that says "Cannot find export BunFile in module bun" What is the feature you are proposing to solve the problem? this would fully support verbatimModuleSyntax intended behavior. What alternatives have you considered? No response”
“What version of Bun is running? 1.1.8+89d25807f What platform is your computer? Linux 6.8.9 x64v3 xanmod1 x86 64 x86 64 What steps can reproduce the bug? Tried looking at debugger by running simple code and stepping through it with debugger and running and at one point, after iterating through last line it goes somewhere else and crashes image What is the expected behavior? I'm not sure, but maybe this is intended? As code execution has been finished at the point of crash, but I don't feel like”
“What version of Bun is running? No response What platform is your computer? No response What steps can reproduce the bug? bun build test.js target=bun What is the expected behavior? Bun What do you see instead? "intercepted" Additional information”
“What version of Bun is running? 1.0.4+6afa78120ac0512bc55d00a8a1562d8f0eafa2c2 What platform is your computer? Darwin 22.5.0 arm64 arm What steps can reproduce the bug? Set "emitDecoratorMetadata": true, execute application What is the expected behavior? Application should just work What do you see instead? The application fails during startup. This also happens if you run bun test . Additional information I don't know how to create a small project so share. It works perfectly with "emitDecorato”
“What version of Bun is running? 1.0.2+37edd5a6e389265738e89265bcbdf2999cb81a49 What platform is your computer? Darwin 21.3.0 arm64 arm What steps can reproduce the bug? What is the expected behavior? it should resolve the "exports" map to find other/tsc.json What do you see instead? When running a bun command that parses tsconfig.json , it prints a warning that it can't find the pkg/tsconfig file. It's doing this because bun is relying on the file structure within pkg for a match. TypeScript fol”
“What version of Bun is running? 0.7.2 What platform is your computer? Linux 6.4.6 1 cachyos x86 64 unknown What steps can reproduce the bug? 1. Create plugin.ts 2. Create bunfig.toml 3. Create index.ts What is the expected behavior? https should be logged in the console. What do you see instead? undefined is logged in the console. Additional information No response”
