[▲ Vercel Community](/) · [Categories](/categories) · [Latest](/latest) · [Top](/top) · [Live](/live)

[Help](/c/help/9)

# Bun runtime: "Requested module is not instantiated yet"

847 views · 12 likes · 26 posts


pompa (@pompaofficial) · 2025-10-29 · ♥ 6

I am trying to get server functions to work with the new bun runtime. Running `vercel dev` locally works. When deploying and running on vercel, the function crashes and I can only see the following in the logs:

```
2025-10-29T10:58:57.242Z \[error\] TypeError: Requested module is not instantiated yet.
at link (native:1:11)
at link (native:1:11)
at link (native:1:11)
at link (native:1:11)
at linkAndEvaluateModule (native:1:11)
at requestImportModule (native:2)
at processTicksAndRejections (native:7:39)
Bun process exited with exit status: 1. The logs above can help with debugging the issue.
TypeError: Requested module is not instantiated yet.
at link (native:1:11)
at link (native:1:11)
at link (native:1:11)
at link (native:1:11)
at linkAndEvaluateModule (native:1:11)
at requestImportModule (native:2)
at processTicksAndRejections (native:7:39)
Bun process exited with exit status: 1. The logs above can help with debugging the issue.
```

Any clue on what's happening and how I can debug this?


Andreas (@aosberghaus) · 2025-11-07

I have the same issue and don’t understand the reason. Locally everything works fine.


Bmz1 (@bmz1) · 2025-11-15

Same, it might be a circular dependency issue. Locally works totally fine.


pompa (@pompaofficial) · 2025-11-15

Unfortunately I didn’t go further than this. Bun runtime on Vercel is still beta. I know there’s been updates recently and better docs so things might have improved.


Raymond (@raymondreamer) · 2025-11-21

Same here, no other logs than this, hard to know what it is


Pauline P. Narvas (@pawlean) · 2025-11-21

Thank you all for sharing your feedback! I've passed it onto the team working on our Bun runtime. :folded_hands: 

Please keep sharing any more feedback here as you come across them, they're all super useful.


Tom Lienard (@quiibz) · 2025-11-21 · ♥ 2

We’re in contact with the Bun team to fix this issue, which appears to be a bug in the Bun runtime. If anyone has a minimal reproduction, it would help accelerate landing a fix :folded_hands:


meluiz (@meluiz) · 2025-11-21 · ♥ 1

I have the same error. My project to reproduce the issue is as follows:

https://github.com/meluiz/apidotcom


Benyamindamircheli (@benyamindamircheli) · 2025-12-01

Is there any update on this, I’m having the same issue.


jx (@jimmyxdom-5287) · 2025-12-01

I think the issue is caused by ALS. After removing that from my code, the issue is gone.


jx (@jimmyxdom-5287) · 2025-12-02

I’m seeing this again after introducing new code to the project. It’s quite annoying and I’m not able to tell which one broke it. @quiibz Does Bun team have an ETA on the fix? Is there a github issue created? Did they suggest any workaround on this? Thank you!


jx (@jimmyxdom-5287) · 2025-12-02 · ♥ 2

@quiibz  I think I found the root cause. In my `tsconfig` there’s a

```
"paths": {
  "@/*": ["./src/*"]
}
```

The issue is gone after I change all `@/` imports to relative path imports.

I also tried to add

```
[resolve]
alias = { "@/*" = "./src/*" }
```
and
```
[resolve]
root = "."
```
to `bunfig.toml`. Unfortunately, none of those could fix the issue.


Vitor Lostada (@vitorlostada) · 2025-12-10

Is there any update on this, I’m having the same issue.


Zhenhua Cao Xrent (@zhenhua-cao-xrent) · 2025-12-11

I encountered similar issue, by commenting out file by file, and library by library, I found my case was caused by `uuid` package. Once removed the package the deployment runs well.

Worth checking bun’s compatibilty list for `node:*` imports.

https://bun.com/docs/runtime/nodejs-compat#node%3Acrypto


im_justmatthew (@qwertyczee) · 2026-01-05

I’m experiencing the same issue with the uuid package (v4 and v7). I’m using uuid ^11.1.0 with Bun + Hono + TypeScript. The error only occurs at runtime when uuid is called in my middleware for generating request IDs, the build process completes successfully.


Clayton K (@clayton-k) · 2026-01-06

Wondering if there is any movement on this?
Tried all workaround mentioned above and elsewhere…
Can’t repro locally, even when serving the prod build output, so can’t really debug further. 
Likely ripping out bun and back to node. :confused:


Gustavo Toledo (@itxtoledo) · 2026-01-08

Hey everyone, especially the folks at Vercel — you say you support Bun, then you say you’re going to fix it, and now more than 3 months have gone by with nothing? My staging environment is broken because of this error, and I can’t deploy to production because it would break there too. Is there really no guidance at all on how to solve this? I’m using express + tRPC + bun


Shreyans Jain (@codewshreyans) · 2026-01-19

This issue is still present.


Iceman8911 (@iceman8911) · 2026-02-02

The worst thing is that this is unreproducible for me locally :;


antogyn (@anthonyginiers-8441) · 2026-02-13

I’m running into the same issue, using Bun + Hono.


Tom Lienard (@quiibz) · 2026-02-18 · ♥ 1

Apologies for the delay, the Bun team told us that this can happen when using top-level `await` along with `require` and cyclic dependencies. Any minimal reproduction would be appreciated to help getting this fixed.


darbymanning (@darbymanning) · 2026-02-20

I can confirm for me, the issue was using path aliases in tsconfig.json. My project is Bun + Elysia, and by removing baseUrl and paths from tsconfig everything works fine, and I get the joys of `import foo from “../../../lib/foo/bar.js”` now :smile:  but at least it works


Prudolfs (@prudolfs) · 2026-03-07

Found a workaround for the `Requested module is not instantiated yet` error when using `ConvexHttpClient` with the Bun runtime on Vercel.

The issue seems tied to how the Bun runtime preset handles module resolution in Serverless Functions. I fixed this by switching the execution environment to the Node.js runtime while keeping the Bun toolchain for the rest of the flow.

**The Fix:**

1. Use `@elysiajs/node` (or your framework's Node adapter).

2. Set `vercel.json` to use `@vercel/node` for the build.

3. Use strict ESM imports (include `.js` extensions) in your TS files so the Node runtime can resolve them.

This setup allows you to keep using Bun for local dev and fast installs, but utilizes the stable Node.js runtime in production to avoid the Convex instantiation bug.


Ericksonmanuel (@ericksonmanuel) · 2026-03-08

So, is it strictly forbidden to use aliases in Bun projects? In my case, I’m using Elysia with absolute paths (“@/…”). This is necessary for good code readability. I ran into this error about four hours ago, but there’s very little documentation on this specific issue.


Prudolfs (@prudolfs) · 2026-03-08

### Bug Update: "Requested module is not instantiated yet" with Convex

I have identified that this error specifically occurs when using `ConvexHttpClient` from the `convex` package (v1.32.0).

**The Root Cause:**

The issue stems from a circular module graph within the `convex/browser` ESM entry points. Specifically:

1. `convex/dist/esm/browser/simple_client.js` imports from `./index.js`.

2. `index.js` re-exports `simple_client.js`.

While this resolves correctly in Node.js and local Bun environments, the **Vercel Bun Runtime (Beta)** fails during the module linking phase, leading to the `TypeError: Requested module is not instantiated yet`.

**Official Issue Tracked Here:**

I have opened a formal issue with the Convex team to see if the module graph can be flattened:

[https://github.com/get-convex/convex-backend/issues/394](https://github.com/get-convex/convex-backend/issues/394)

**Current Workaround:**

To unblock your deployment, switch from the Bun runtime to the Node.js runtime on Vercel:

1. Use `@elysiajs/node` (or your framework's Node adapter).

2. Update `vercel.json` to use the `@vercel/node` builder.

3. **Important:** Ensure all internal relative imports in your TypeScript files use explicit `.js` extensions (e.g., `import { routes } from './routes.js'`) so the Node ESM loader can resolve them without the "module not found" error.


Prudolfs (@prudolfs) · 2026-03-08

[quote="ericksonmanuel, post:26, topic:26380"]
So, is it strictly forbidden to use aliases in Bun projects? In my case, I’m using Elysia with absolute paths (“@/…”). This is necessary for good code readability. I ran into this error about four hours ago, but there’s very little documentation on this specific issue.

[/quote]

I initially suspected my path aliases (`@/...`) were causing this, but after some deep diving, I found that wasn't the case. Path aliases are generally fine in Bun/Elysia projects as long as they are mapped correctly in your `tsconfig.json`.

In my case, the `Requested module is not instantiated yet` error was actually triggered by the `convex` package (@1.32.0). There is a circular dependency in their ESM entry point (`convex/browser`) that the Vercel Bun runtime (Beta) struggles to link, even though it works fine in local Bun and Node.js environments.

If you are seeing this error and using Convex (or other libraries with complex barrel exports), the aliases might be a red herring. The real issue is likely the runtime's ESM linker.