271 questions
Best practices
4
votes
0
replies
52
views
What would be the best way to manage separate processes in JavaScript
My project task is to query devices. I use JS and Bun as my API.
Example. On the site user add a device, lets's say over MQTT. He enters MQTT connection parameters and save device. I store in in DB. ...
-4
votes
0
answers
66
views
How to omit "prod" dependencies from package.json using bun? [closed]
I am setting up a DevContainer and want to install only devDependencies.
With npm, I would typically achieve this using:
npm install --omit=prod
However, I am switching to BunJS and looking for the ...
1
vote
2
answers
73
views
How to call a PostgreSQL bulk upsert function in TypeScript/BunJS
I'm working on a database to store information from .warc files, which are being parsed by a program I wrote in BunJS. The problem is that inserting data into the database takes a long time to insert ...
-1
votes
1
answer
89
views
Version Manager for Bun [closed]
I want to try out Bun, but I know sooner or later I will need to update it. And it is better not to install it globally, but have it easily managed per project. In other words, what nvm does for Node....
1
vote
0
answers
27
views
Bun --hot flag not working with Bun.listen: EADDRINUSE error on hot reload
Problem
When using bun --hot with Bun.listen(), hot reload fails with an EADDRINUSE error because the previous server instance doesn't close before the new one tries to start.
Environment
Bun version:...
1
vote
0
answers
166
views
How to force Bun to use ECMAScript Stage 3 Decorators instead of legacy TypeScript decorators?
I am trying to use standard ECMAScript Stage 3 Decorators in a TypeScript environment. I have configured my tsconfig.json with "experimentalDecorators": false and "target": "...
-1
votes
1
answer
215
views
issue of running playewright using bunjs
i am trying to run playwright in bun. but when i run bun run test.ts, the output hangs at Launching Chromium....
output:
PS D:\\Javascript files\\ss_url_project_copy\\backend\> bun run test.ts
...
-3
votes
1
answer
74
views
"TypeError: method is not a function" when invoking methods on objects deserialized from a JSON file [duplicate]
I'm working on a project from Roadmap.sh with TypeScript (v5.9.3) running on Bun (v1.3.3 on a Linux x64 VM). Currently I'm writing the data access logic, implemented using the Repository pattern, but ...
1
vote
0
answers
54
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
172
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
449
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 ...
-2
votes
1
answer
299
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 ...
-1
votes
1
answer
129
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 ...
1
vote
0
answers
333
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": &...
3
votes
0
answers
249
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 ...