267 questions
1
vote
0
answers
29
views
Bun + Express on Vercel: How to Modularize Routes from Separate Files?
I'm deploying a Bun + Express application to Vercel. Locally, my Express app works perfectly with routes defined in separate files and imported into index.ts. However, on Vercel, the deployment ...
Advice
0
votes
2
replies
51
views
How to use Bun for frontend and backend at the same time?
Bun supports React, it can do SSR, it can work as backend server with routing etc.
I am trying to figure out if there is an elegant way to create a fullstack application as a single project.
I am ...
0
votes
1
answer
111
views
Using TailwindCSS v4 in Bun SSR - how can I integrate it?
The TailwindCSS website currently doesn't have any guidance related to Bun, so it's difficult for me to figure out how to properly integrate v4 with Bun SSR. I found a bun-plugin-tailwind dependency ...
-1
votes
1
answer
125
views
How to manage environment variables if I initialize Bun + React project using "bun init" then select "React"?
I have created a .env file then I have written this code:
VITE_API_URL=http://localhost:5000/api
I have applied the "VITE_API_URL" environment variable, but it gives an error. I also tried ...
0
votes
1
answer
81
views
why my bun with cache with docker is slower than node.js without a cache (i'm running both of them on localhost)
when i test my code with jmeter my average respond time on the bun with cache is higher that node.js that dont, i using 100 thread with period 1 second, but it seems the standard deviation is better ...
0
votes
0
answers
177
views
Bun install fails for private Git repo even with .npmrc and env variable for Bitbucket token
I'm trying to install a private Bitbucket Git repository as a dependency in my project using Bun v1.2.10 on Windows.
My package.json dependency:
"dependencies": { "@repo/sdk": &...
2
votes
0
answers
144
views
Unable to run Inngest dev server using Bun (inngest-cli not recognized)
According to the official Inngest documentation, I’m setting up Inngest with a Next.js App Router project using the Bun runtime. I followed the installation steps exactly as described.
However, when I ...
1
vote
1
answer
125
views
Npm Commands such as: npm create vite@latest or npm start don't work after installing Bun on WIndows 11
Since installing bun on my Windows 11 pc and using node.js with npm for a several years, all of the npm functionality have crashed such as npm start and npm create in react.js and react-native. Also ...
2
votes
1
answer
66
views
SVG started to work after I re-save without changing anything
I'm building a website using React with Bun, also Tailwind 4. (Don't think this matters, but anyway)
import logo1 from "./logo_stroke.svg";
import logo2 from './assets/logo_stroke.svg';
.......
1
vote
0
answers
120
views
import.meta.env and Bun.env undefined in pure bun project
I created a bun project:
bun init --react
and then added .env file along project.json:
BUN_PUBLIC_BAR="BAR1"
BUN_PUBLIC_FOO="FOO1"
my bunfig.toml:
[serve.static]
env = "...
1
vote
2
answers
217
views
Bun with uWebSockets -- node version error on Linux
Gentoo Linux. Node v22.13.1.
bun --watch ./uws/uws.js
17 |
18 | module.exports = (() => {
19 | try {
20 | return require('./uws_' + process.platform + '_' + process.arch + '_' + ...
0
votes
0
answers
59
views
How to enable metal is being used by tensorflow.js with node/Bun
Please comment how to enable Metal with tfjs-node on MacOS
+Metal isn't ready with tensorflow (c++) on the server side.
bun ./verify-backend.js
const tf = require('@tensorflow/tfjs-node');
async ...
0
votes
0
answers
48
views
How can i use arcjet with bun & express
I'm trying to use arcjet middleware to protect my express routes against spamming and bots
but in their documents i only get option for plain bun or node.js and express, while i'm using bun & ...
1
vote
0
answers
67
views
TypeScript throwing error: 2339 - Property user doesn't exist on type
user.routes.ts:
import { Elysia } from "elysia";
import { authMiddleware } from "../middleware/isAuthenticated";
export const usersRoutes = new Elysia({ prefix: "/users" ...
0
votes
1
answer
107
views
Unable to create Nextjs app with Bun, tsconfig.json error
During my creation of a nextjs app with bun, I get the following error. There is an issue while trying to create the tsconfig.json
After going to the project directory, since the installation has ...
0
votes
1
answer
129
views
TypeScript compiler not reporting type errors in monorepository
The objective is to run the type-checking command from the root of the project, which should validate the code across all packages specified in the workspaces. The current setup successfully executes ...
1
vote
0
answers
61
views
Could not find native build for Couchbase with bun
while trying to build a docker image for my Bun project, I get the following error:
2025-05-07 15:22:07 error: Could not find native build for platform=linux, arch=arm64, runtime=napi, nodeVersion=22....
0
votes
0
answers
49
views
how to use workers in a build application?
I have a scenario, where i want to use workers to render a react template into a buffer and then return it to the caller.
While it works perfectly fine when just starting the application, it fails ...
1
vote
0
answers
493
views
typescript import error while using bun workspaces, might because how bun install node_modules in monorepo
Getting this error while using monorepos with bun-workspaces. While I don't suggest to use bun for monorepo. I have packages/* and apps/* getting error while importing drizzle-client pacakges from ...
0
votes
0
answers
85
views
How to Evaluate Multi-Statement SQL Queries at once & get result returned with SQLite?
I'm building an educational platform where students write SQL queries in a Monaco Editor for database-related assignments. The system auto-evaluates their submissions by comparing the query results to ...
1
vote
0
answers
1k
views
Having issues building angular app using bun run
Has anyone started an angular project with bun in windows.
I'm currently facing an issue when trying to run the app using bun, the build takes more than an hour to build.
The steps I took:
bun install ...
0
votes
1
answer
64
views
running js libraries that use require in typescript + bunJS forces the use of .default
I am trying to integrate an existing library in my new codebase using typescript and Bun. i am facing an issue where this library is requiring modules in code asynchronously, like follows :
let target ...
1
vote
1
answer
73
views
How Can I Run My Local Verdaccio Package with Bun Without Changing the Registry?
I published a package to my local Verdaccio and can run it using npx my-cli. However, I want to run it with Bun.
After searching for how to do this, I found the bunx command. When I run bunx my-cli, I ...
1
vote
0
answers
101
views
How can I install node_modules for an architecture other than my dev machine?
I'm working on a yocto project and I'm doing the development on an x86 linux machine. However, the build target is arm64 linux, and I need the native modules (specifically sharp) to be compiled for ...
0
votes
1
answer
617
views
Having a challenge starting my bun project after running build command
I worked on a project using bun (my first time using bun), and I am struggling to start my project after running the build command.
Anytime I try running bun start this kept happening
$ bun start dist/...
0
votes
1
answer
817
views
Using Bun + Hono, serveStatic middle throws 404 even though files to serve exist
I am trying to serve static frontend only react apps through bun and using hono for framework. My code for server is :
import { Hono } from "hono";
import { cors } from "hono/cors";...
1
vote
0
answers
124
views
Bun + drizzle + sqlite = broken types for update/insert
I have a basic sqlite store
drizzle-orm: ^0.39.3,
drizzle-kit: ^0.30.4
// drizzle.config.ts
import { defineConfig } from 'drizzle-kit';
export const DB_FILE = "file:./storage/storage.db";
...
0
votes
0
answers
61
views
GCP Cloud Storage only returns one line on decompressive transcoding
I upload gzip compressed files to a bucket on GCS. I set the metadata of the object as follows:
Content-Encoding: gzip
Content-Type: application/json
According to GCS documentation, this makes my ...
2
votes
1
answer
60
views
Nodejs/Bun high resolution setInterval for <5ms
How to make a high-resolution setInterval in Node with
It's possible in browser with just setInterval
I want to make an real-time application for working with serial on 250Hz speed
For this I need to ...
0
votes
0
answers
45
views
error: No version matching "^0.4.9" found for specifier "eslint-plugin-react-refresh" (but package exists) on setting up Vite+React project using bun
bun install v1.2.2 (c1708ea6)
error: No version matching "^0.4.9" found for specifier "eslint-plugin-react-refresh" (but package exists)
error: eslint-plugin-react-refresh@^0.4.9 ...
2
votes
0
answers
235
views
Bun uses wrong path for css chunk files. How to fix path?
Bun uses wrong path for CSS chunk files. How to fix path if frontend is in different directory than server?
I just started using bun to deploy a fullstack Dev Server while following bun.sh/docs ...
-1
votes
1
answer
115
views
Images don't load in production
I am developing this solely frontend app using react, bun, vite and typescript. This app uses react-router-dom and is composed of routes. Every route corresponds to an era and in every route there is ...
1
vote
1
answer
223
views
Typescript complains that vitests onTestFailed function is undefined despite of importing it
I'm trying to add additional information to failing tests in a bigger typescript project.
I found the onTestFailed hook that registers a callback function to a test.
So for a quick test, I followed ...
2
votes
1
answer
153
views
Suppress warnings in bun js for HTMLParseError using non-html markup
I am using bun (and a library called bun-plugin-html) to inject css and javascript and build a source html file to a target file.
The html is actually a Tumblr template so it uses handlebars/moustache-...
2
votes
2
answers
245
views
Express Server not able to bind to any port. app.Listen() is returning `Uncaught Exception` for all ports I am trying
I was trying to setup my Ubuntu 20.04 to run my expressJS server but this error is not letting me do that. So here is the whole problem:
I am using bun instead of node for this project. My package....
1
vote
0
answers
57
views
conditional CICD with shared directories in monorepo
I have a bun monorepo structured similarly to
root/
apps/
app1/
app2/
app3/
shared/
lib1/
lib2/
lib3/
where I build and deploy apps 1 through 3 ...
0
votes
0
answers
793
views
Bun `build --compile` with embedded assets
I'm experimenting with embedding assets into executable. The executable successfully logs the JSON file's content even if the executable is moved elsewhere. However, the file does not appear in the ...
0
votes
0
answers
344
views
How to turn bun.js async call into sync?
I need to turn async function running in the bun.js engine into sync one.
Reason: large codebase depends on existing sync implementation of the getData function. It needs to be evolved and utilise ...
1
vote
1
answer
322
views
Astro build freezes after upgrading to v5
I am unable to build my Astro project after upgrading to v5 even though it still runs in dev mode. I use the following command to build the Astro app with Bun:
bunx --bun astro build
and now the ...
0
votes
0
answers
197
views
How to stream shell script output in real-time using Bun, Hono?
I'm trying to create a real-time streaming output of a shell script execution using Bun and Hono. Currently, the output is buffered and only shows up all at once when the script finishes, but I need ...
0
votes
0
answers
32
views
R2 DeleteObjectCommand Always Returns 204 - Even for Non-Existent or Random Keys
I'm experiencing an unusual behavior with the DeleteObjectCommand in the AWS SDK for JavaScript (v3) when interacting with R2. When I call DeleteObjectCommand, it consistently returns a 204 status ...
0
votes
1
answer
847
views
Issues setting up ShadCN with Next.js: Bun cache errors and installation failures
I'm trying to set up ShadCN in my Next.js project, but I’ve been running into persistent issues related to Bun, dependency installation, and cache errors. I've tried multiple approaches, but nothing ...
1
vote
0
answers
193
views
octet-stream memory leaking when using Bun and Elysia
So a few weeks ago, I ported my app that uses NodeJS to Bun (and also moved from Express to Elysia). However, it seems that it's heavily memory leaking when there is a lot of traffic going on.
memory ...
3
votes
3
answers
1k
views
drizzle-kit not using .env.test or .env.development in bun.js
I'm working with bun.js and I'm trying to do bun run drizzle-kit push, bun run drizzle-kit generate, bun run drizzle-kit migrate but no any of these commands works for testing environment, the drizzle ...
2
votes
1
answer
377
views
Bun.js Packet losses in Websocket
I created a Websocket server using Bun.serve(). In this server, when a new client connects, I send it 1 million packets with a for loop. But these packets are interrupted. Hundreds of thousands of ...
1
vote
1
answer
176
views
Running bun add while bun dev is already running
currently I am learning SolidJS and using bun. I wonder if there a way to run bun add command without stopping bun dev. Like in npm, I can npm install without stopping current dev server. Because ...
1
vote
1
answer
382
views
Issues with Defining a Recursive Schema in Elysia
I'm currently working on a project using Elysia, and I'm trying to define a recursive schema for product variants. My goal is to allow each variant to have children, which can also be variants ...
-1
votes
1
answer
100
views
How to preserve newlines inside of JSX tags in TSX TypeScript?
I would like to use TSX for Markdown rendering, the problem - TypeScript TSX Compiler strips newlines and it breaks the markdown.
The example below would output text as Some text. - list item a - list ...
0
votes
0
answers
243
views
Why does bun execute this simple code 2 times as long as node.js?
I saw how fast bun was and generated some random code to compare node.js and bun. I expected bun would execute much faster than node.js but bun takes two times as long as node.js.
[Code]
// 2. Matrix ...
0
votes
1
answer
1k
views
How to stream and consume 2 binary files with Hono and Bun?
I need to stream 2 binary files from the filesystem from a Hono app to another Hono app.
Doing just one file is very easy with Bun and Hono Streaming API.
// Streaming app
import { Hono } from "...