drizzle-team / drizzle-team/drizzle-orm
[BUG]: bun fail to build when calling drizzle-kit 0.31.8
- Dominant language
- TypeScript
- Stars
- 35.8k
- Forks
- 1.6k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 4
Description
### Report hasn't been filed before.
- [x] I have verified that the bug I'm about to report hasn't been filed before.
### What version of `drizzle-orm` are you using?
0.45.0
### What version of `drizzle-kit` are you using?
0.31.8
### Other packages
bun@1.3.3
### Describe the Bug
When running bun build, I got:
```
Run bun build ./src/index.ts \
72301 | const { PGlite, types: types3 } = await import("@electric-sql/pglite");
^
error: Could not resolve: "@electric-sql/pglite". Maybe you need to "bun install"?
at /home/runner/work/touitomamout-next/touitomamout-next/node_modules/drizzle-kit/api.mjs:72301:58
72352 | const { default: pg } = await import("pg");
^
error: Could not resolve: "pg". Maybe you need to "bun install"?
at /home/runner/work/touitomamout-next/touitomamout-next/node_modules/drizzle-kit/api.mjs:72352:46
72423 | const postgres = await import("postgres");
^
error: Could not resolve: "postgres". Maybe you need to "bun install"?
at /home/runner/work/touitomamout-next/touitomamout-next/node_modules/drizzle-kit/api.mjs:72423:39
72473 | const { VercelPool, types: pgTypes } = await import("@vercel/postgres");
^
error: Could not resolve: "@vercel/postgres". Maybe you need to "bun install"?
at /home/runner/work/touitomamout-next/touitomamout-next/node_modules/drizzle-kit/api.mjs:72473:61
72552 | const { Pool, neonConfig, types: pgTypes } = await import("@neondatabase/serverless");
^
error: Could not resolve: "@neondatabase/serverless". Maybe you need to "bun install"?
at /home/runner/work/touitomamout-next/touitomamout-next/node_modules/drizzle-kit/api.mjs:72552:67
72709 | const { createConnection } = await import("mysql2/promise");
^
error: Could not resolve: "mysql2/promise". Maybe you need to "bun install"?
at /home/runner/work/touitomamout-next/touitomamout-next/node_modules/drizzle-kit/api.mjs:72709:51
72782 | const { createConnection } = await import("mysql2/promise");
^
error: Could not resolve: "mysql2/promise". Maybe you need to "bun install"?
at /home/runner/work/touitomamout-next/touitomamout-next/node_modules/drizzle-kit/api.mjs:72782:51
72839 | const { Client: Client2 } = await import("@planetscale/database");
^
error: Could not resolve: "@planetscale/database". Maybe you need to "bun install"?
at /home/runner/work/touitomamout-next/touitomamout-next/node_modules/drizzle-kit/api.mjs:72839:50
73005 | const { createClient } = await import("@libsql/client");
^
error: Could not resolve: "@libsql/client". Maybe you need to "bun install"?
at /home/runner/work/touitomamout-next/touitomamout-next/node_modules/drizzle-kit/api.mjs:73005:47
73057 | const { default: Database } = await import("better-sqlite3");
^
error: Could not resolve: "better-sqlite3". Maybe you need to "bun install"?
at /home/runner/work/touitomamout-next/touitomamout-next/node_modules/drizzle-kit/api.mjs:73057:52
73112 | const { createClient } = await import("@libsql/client");
^
error: Could not resolve: "@libsql/client". Maybe you need to "bun install"?
at /home/runner/work/touitomamout-next/touitomamout-next/node_modules/drizzle-kit/api.mjs:73112:47
1s
Run bun build ./src/index.ts \
72301 | const { PGlite, types: types3 } = await import("@electric-sql/pglite");
^
error: Could not resolve: "@electric-sql/pglite". Maybe you need to "bun install"?
at /home/runner/work/touitomamout-next/touitomamout-next/node_modules/drizzle-kit/api.mjs:72301:58
72352 | const { default: pg } = await import("pg");
^
error: Could not resolve: "pg". Maybe you need to "bun install"?
at /home/runner/work/touitomamout-next/touitomamout-next/node_modules/drizzle-kit/api.mjs:72352:46
72423 | const postgres = await import("postgres");
^
error: Could not resolve: "postgres". Maybe you need to "bun install"?
at /home/runner/work/touitomamout-next/touitomamout-next/node_modules/drizzle-kit/api.mjs:72423:39
72473 | const { VercelPool, types: pgTypes } = await import("@vercel/postgres");
^
error: Could not resolve: "@vercel/postgres". Maybe you need to "bun install"?
at /home/runner/work/touitomamout-next/touitomamout-next/node_modules/drizzle-kit/api.mjs:72473:61
72552 | const { Pool, neonConfig, types: pgTypes } = await import("@neondatabase/serverless");
^
error: Could not resolve: "@neondatabase/serverless". Maybe you need to "bun install"?
at /home/runner/work/touitomamout-next/touitomamout-next/node_modules/drizzle-kit/api.mjs:72552:67
72709 | const { createConnection } = await import("mysql2/promise");
^
error: Could not resolve: "mysql2/promise". Maybe you need to "bun install"?
at /home/runner/work/touitomamout-next/touitomamout-next/node_modules/drizzle-kit/api.mjs:72709:51
72782 | const { createConnection } = await import("mysql2/promise");
^
error: Could not resolve: "mysql2/promise". Maybe you need to "bun install"?
at /home/runner/work/touitomamout-next/touitomamout-next/node_modules/drizzle-kit/api.mjs:72782:51
72839 | const { Client: Client2 } = await import("@planetscale/database");
^
error: Could not resolve: "@planetscale/database". Maybe you need to "bun install"?
at /home/runner/work/touitomamout-next/touitomamout-next/node_modules/drizzle-kit/api.mjs:72839:50
73005 | const { createClient } = await import("@libsql/client");
^
error: Could not resolve: "@libsql/client". Maybe you need to "bun install"?
at /home/runner/work/touitomamout-next/touitomamout-next/node_modules/drizzle-kit/api.mjs:73005:47
73057 | const { default: Database } = await import("better-sqlite3");
^
error: Could not resolve: "better-sqlite3". Maybe you need to "bun install"?
at /home/runner/work/touitomamout-next/touitomamout-next/node_modules/drizzle-kit/api.mjs:73057:52
73112 | const { createClient } = await import("@libsql/client");
^
error: Could not resolve: "@libsql/client". Maybe you need to "bun install"?
at /home/runner/work/touitomamout-next/touitomamout-next/node_modules/drizzle-kit/api.mjs:73112:47
Error: Process completed with exit code 1.
0s
```
I do not want to install those dependencies, and it was fine in `0.31.7`
Contributor guide
Assessment
This issue has not been assessed yet.