Closed henpa closed 4 months ago
Hi @henpa this issue https://github.com/vitejs/vite/issues/14351 is a similar one 🤔
@henpa Did you solve this issue?
Hello @henpa. Please provide the missing information requested above.
Issues marked with STATUS-2: missing info
will be automatically closed if they have no activity within 14 days.
Thanks 🙏
Which component is affected?
Qwik Runtime
Describe the bug
I'm trying to use use and deploy qwik using Bun and it's sqlite libray "bun:sqlite", without success.
After
bun create qwik@latest
and selectingEmpty App
, I replaced thesrc/routes/index.tsx
file with the content below:When I run
bun start
I get the error:[vite] Internal server error: Cannot find module 'bun:sqlite' imported from '/Users/me/test1/src/routes/index.tsx'
Trying to deploy using Bun didn't work either. This is what I tried.
First, added the integration:
bun run qwik add bun
I also installed Bun's types withbun install -d bun-types
and added"bun-types"
tocompilerOptions.types
intsconfig.js
And when I try to run
bun run build
I get this error:[vite]: Rollup failed to resolve import "bun:sqlite" from "/Users/henpa/dev/test1/src/routes/index.tsx". This is most likely unintended because it can break your application at runtime. If you do want to externalize this module explicitly add it to build.rollupOptions.external
Then I tried to add to
vite.config.ts
the following:When I run
bun run build
again I get this error:Error [PLUGIN_ERROR]: Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. Received protocol 'bun:'
Is it possible to run and deploy to Bun and use bun:sqlite? Thanks!
Reproduction
https://github.com/henpa/test1
Steps to reproduce
bun create qwik@latest bun start bun run qwik add bun
System Info
Additional Information
No response