@elysia/[email protected] fails to resolve typebox under Bun
Author: LanXa7Created Aug 12, 2026Updated Aug 26, 2026
Labelsbug
What version of Elysia is running?
What platform is your computer?
Darwin 27.0.0 arm64 arm
What environment are you using
1.3.14
Are you using dynamic mode?
no
What steps can reproduce the bug?
@rohit-jsfreaky
Minimal reproduction
Repository: https://github.com/LanXa7/Elysia-minimal-reproduction-package
Environment:
- Bun 1.3.14
[email protected]@elysia/[email protected]- macOS arm64
Reproduce:
git clone https://github.com/LanXa7/Elysia-minimal-reproduction-package.git
cd Elysia-minimal-reproduction-package
bun install
bun run repro
Actual result:
error: Cannot find module '../node_modules/typebox/build/type/script/script.mjs'
from 'node_modules/@elysia/openapi/dist/gen/index.mjs'
@elysia/openapi/dist/gen/index.mjs contains:
import { Script } from "../node_modules/typebox/build/type/script/script.mjs";
import "../node_modules/typebox/build/type/index.mjs";
From dist/gen/index.mjs, this resolves under
@elysia/openapi/dist/node_modules, but that directory does not exist.
The installed typebox package is located at the project-level
node_modules/typebox.
The same issue occurs with a minimal import:
import openapi from "@elysia/openapi";
import { Elysia } from "elysia";
new Elysia().use(openapi());
### What is the expected behavior?
_No response_
### What do you see instead?
_No response_
### Additional information
_No response_
### Have you try removing the `node_modules` and `bun.lock` and try again yet?
_No response_Source: elysiajs/elysia