S
SolidJS•2mo ago
Cyber Grandma

SSR failed to import "drizzle-orm/bun-sqlite"

Hi, here's the error I get
1:20:01 PM [vite] Error when evaluating SSR module /src/db/index.ts: failed to import "drizzle-orm/bun-sqlite"
|- Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. Received protocol 'bun:'
at throwIfUnsupportedURLScheme (node:internal/modules/esm/load:228:11)
at defaultLoad (node:internal/modules/esm/load:110:3)
at ModuleLoader.load (node:internal/modules/esm/loader:567:13)
at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:442:56)
at new ModuleJob (node:internal/modules/esm/module_job:76:27)
at #createModuleJob (node:internal/modules/esm/loader:455:17)
at ModuleLoader.getJobFromResolveResult (node:internal/modules/esm/loader:266:34)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:247:17)
1:20:01 PM [vite] Error when evaluating SSR module /src/db/index.ts: failed to import "drizzle-orm/bun-sqlite"
|- Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. Received protocol 'bun:'
at throwIfUnsupportedURLScheme (node:internal/modules/esm/load:228:11)
at defaultLoad (node:internal/modules/esm/load:110:3)
at ModuleLoader.load (node:internal/modules/esm/loader:567:13)
at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:442:56)
at new ModuleJob (node:internal/modules/esm/module_job:76:27)
at #createModuleJob (node:internal/modules/esm/loader:455:17)
at ModuleLoader.getJobFromResolveResult (node:internal/modules/esm/loader:266:34)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:247:17)
I am not sure if I should post this here or in Drizzle server but it seems more like an issue with vite. I've used drizzle successfully in other solid projects so I don't know what is specific here.
1 Reply
Cyber Grandma
Cyber GrandmaOP•2mo ago
Oh ok I forgot to add the --bun option to bun run 😂
Want results from more Discord servers?
Add your server