-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
missing .svelte-kit/output/runtime/control.js file causes deno typechecks to fail #12930
Comments
actually it looks like this issue is already known on the deno side denoland/deno#26155. It sounds like the consensus is that deno is doing the "correct" thing when disabling typechecking. I think deno could be more lenient on these deep library errors, but I would still push that fixing this incorrect typing on the sveltekit side would unblock a lot of deno + sveltekit users |
Please provide a minimal reproduction instead of a link to your project. |
Sure. This has a paired down version of the issue https://github.com/andykais/sveltekit-deno-build-bug-repro. I needed to include my custom deno adapter mainly just because I need to trigger the |
I attached a bit more info on the bug. If its helpful, I can separate the commits between what |
I'm unable to reproduce the issue with the given reproduction. Below are the full logs / commands I've used. Note: I had to specifically run ❯ git clone git@github.com:andykais/sveltekit-deno-build-bug-repro.git
cd sveltekit-deno-build-bug-repro
deno run --check npm:vite build
Cloning into 'sveltekit-deno-build-bug-repro'...
remote: Enumerating objects: 38, done.
remote: Counting objects: 100% (38/38), done.
remote: Compressing objects: 100% (31/31), done.
remote: Total 38 (delta 3), reused 37 (delta 2), pack-reused 0 (from 0)
Receiving objects: 100% (38/38), 32.83 KiB | 146.00 KiB/s, done.
Resolving deltas: 100% (3/3), done.
error: Could not find "vite" in a node_modules folder. Deno expects the node_modules/ directory to be up to date. Did you forget to run `deno install`?
~/github/sveltekit-deno-build-bug-repro main
❯ deno install --allow-scripts=npm:@sveltejs/kit@2.8.0
~/github/sveltekit-deno-build-bug-repro main*
❯ deno run --check npm:vite build
✅ Granted all env access.
✅ Granted all read access.
✅ Granted all sys access.
✅ Granted all write access.
Check file:///home/chewteeming/github/sveltekit-deno-build-bug-repro/vite.config.ts.timestamp-1731378330493-fc4e924358a7d.mjs
error during build:
TypeError: Relative import path "esbuild" not prefixed with / or ./ or ../
hint: If you want to use a JSR or npm package, try running `deno add jsr:esbuild` or `deno add npm:esbuild`
at file:///home/chewteeming/github/sveltekit-deno-build-bug-repro/adapter/adapter.js:4:21
at async load_config (file:///home/chewteeming/github/sveltekit-deno-build-bug-repro/node_modules/.deno/@sveltejs+kit@2.8.0/node_modules/@sveltejs/kit/src/core/config/index.js:71:17)
at async sveltekit (file:///home/chewteeming/github/sveltekit-deno-build-bug-repro/node_modules/.deno/@sveltejs+kit@2.8.0/node_modules/@sveltejs/kit/src/exports/vite/index.js:131:24)
at async Promise.all (index 0)
at async asyncFlatten (file:///home/chewteeming/github/sveltekit-deno-build-bug-repro/node_modules/.deno/vite@5.4.11/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:17501:12)
at async resolveConfig (file:///home/chewteeming/github/sveltekit-deno-build-bug-repro/node_modules/.deno/vite@5.4.11/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:66166:27)
at async build (file:///home/chewteeming/github/sveltekit-deno-build-bug-repro/node_modules/.deno/vite@5.4.11/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:65237:18)
at async CAC.<anonymous> (file:///home/chewteeming/github/sveltekit-deno-build-bug-repro/node_modules/.deno/vite@5.4.11/node_modules/vite/dist/node/cli.js:828:5) |
Possibly related #12986 |
Describe the bug
Since upgrading to deno 2, I am getting build failures using sveltekit. This seems to be because an autogenerated file
.svelte-kit/output/server/index.js
references a non existent file.svelte-kit/output/runtime/control.js
(.svelte-kit/output/runtime/
doesnt appear to be a folder at all locally). The exact code referenced inindex.js
is this:I will be opening an issue on the deno side since this seems to be a runtime error despite this being a jsdoc comment which is confusing, but there is still something funky about a reference to a non existent file.
Reproduction
repro using this project here https://github.com/andykais/forager/tree/main/web. Steps to repro are below:
git clone git@github.com:andykais/forager.git cd web deno install deno task build
Logs
envinfo
output:The text was updated successfully, but these errors were encountered: