Bun runtime: "Requested module is not instantiated yet"

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?

6 Likes

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

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

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.

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

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.

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:

2 Likes

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

1 Like

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

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

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!

@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.

2 Likes

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

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.

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.

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:

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

This issue is still present.

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

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