-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Which component is affected?
Qwik Runtime
Describe the bug
When building a Qwik project with Deno, the process fails because the Vite build.outDir is unexpectedly set to an absolute path (/dist) instead of a relative path (./dist).
As a result, Deno attempts to write to the system root directory — which typically requires elevated permissions and therefore triggers a EACCES: permission denied error on most systems.
This also blocks the Astro integration from working properly in Deno:
🔗 QwikDev/astro#266
Expected behavior
The build should succeed and generate output inside the local project folder (e.g. ./dist), just like in Node or Bun environments.
Actual behavior
vite v5.3.5 building for production...
(!) outDir /dist is not inside project root and will not be emptied.
Use --emptyOutDir to override.
✓ 37 modules transformed.
x Build failed in 1.84s
error during build:
EACCES: permission denied, mkdir '/dist'Reproduction
https://github.com/siguici/qwik-deno
Steps to reproduce
deno -A npm:create-qwik empty qwik-deno
cd qwik-deno
deno install --allow-scripts
deno task buildSystem Info
System:
OS: Linux 5.15 Ubuntu 24.04.2 LTS 24.04.2 LTS (Noble Numbat)
CPU: (4) x64 Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz
Memory: 6.80 GB / 7.72 GB
Container: Yes
Shell: 5.9 - /usr/bin/zsh
Binaries:
Node: 22.17.0 - ~/.volta/bin/node
npm: 10.9.2 - ~/.volta/bin/npm
pnpm: 10.11.0 - ~/.local/share/pnpm/pnpm
bun: 1.2.17 - ~/.bun/bin/bun
deno: 2.3.5 - ~/.deno/bin/deno
npmPackages:
@builder.io/qwik: ^1.14.1 => 1.14.1
@builder.io/qwik-city: ^1.14.1 => 1.14.1
typescript: 5.4.5 => 5.4.5
undici: * => 7.11.0
vite: 5.3.5 => 5.3.5Additional Information
I'm currently trying to locate the exact place within Qwik — or its Vite plugin — where the build.outDir is being set during the integration flow.
Even when overriding outDir manually in vite.config.ts, the issue persists, which suggests that the absolute path /dist may be injected deeper within Qwik’s internal logic, or at plugin level, rather than being a simple misconfiguration in userland.
This behavior doesn't show up under Node.js or Bun, but under Deno it becomes problematic because absolute paths like /dist attempt to write to the root of the file system, requiring elevated permissions.
If anyone has insight into where this output path is defined or enforced inside Qwik’s internals, please feel free to point me in the right direction — I’d love to open a PR and help resolve this.
Let me know if you'd like me to handle the fix! 🚀