-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
p3-minor-bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)
Description
Describe the bug
Attempting to interact with "node:sqlite" in any way triggers an error along the lines of
Error: Failed to load url sqlite (resolved id: sqlite). Does the file exist?
- /node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:51969:17
for my reproduction example, all I needed to do was add import { DatabaseSync } from 'node:sqlite'; to the basic.test.ts file. The StackBlitz list is node 18, because I don't know how to change it, but this bug happens with both Node.js 22 and 23.
I believe it is related to vitest appearing to drop the "node:" part of the import. Please let me know how I can further help.
Reproduction
System Info
System:
OS: Linux 6.8 Ubuntu 24.04.1 LTS 24.04.1 LTS (Noble Numbat)
CPU: (16) x64 AMD Ryzen 7 5800X 8-Core Processor
Memory: 7.86 GB / 15.53 GB
Container: Yes
Shell: 5.9 - /usr/bin/zsh
Binaries:
Node: 23.5.0 - ~/.nvm/versions/node/v23.5.0/bin/node
npm: 10.9.2 - ~/.nvm/versions/node/v23.5.0/bin/npm
pnpm: 9.15.2 - ~/.local/share/pnpm/pnpm
bun: 1.1.38 - ~/.bun/bin/bun
npmPackages:
@vitest/coverage-v8: ^2.1.8 => 2.1.8
vitest: ^2.1.8 => 2.1.8Used Package Manager
pnpm
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
p3-minor-bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)