Content-Length: 312614 | pFad | http://github.com/sveltejs/kit/issues/13806

C7 2.21.0 -> 2.21.1 breaks `deno task build` · Issue #13806 · sveltejs/kit · GitHub
Skip to content

2.21.0 -> 2.21.1 breaks deno task build #13806

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

Closed
liamdiprose opened this issue May 19, 2025 · 8 comments
Closed

2.21.0 -> 2.21.1 breaks deno task build #13806

liamdiprose opened this issue May 19, 2025 · 8 comments

Comments

@liamdiprose
Copy link

liamdiprose commented May 19, 2025

Describe the bug

Just started a new project with "@sveltejs/kit": "2.21.1",, which causes deno task build to break. Downgrading to 2.21.0 works.

Hoping the regression can be identified while the release is fresh.

Reproduction

With a new skeleton project:

Works
deno add npm:@sveltejs/kit@2.21.0 -D
deno task build
Breaks
deno add npm:@sveltejs/kit@2.21.1 -D
deno task build

Logs

liam@laptop ~/w/p/project (master) [1]> deno task build
Task build vite build
vite v6.3.5 building SSR bundle for production...
✔ [paraglide-js] Compilation complete (message-modules)
transforming (1) node_modules/.deno/@sveltejs+kit@2.21.1/node_modules/@sveltejs/kit/src/runtime/server/index.js/*! 🌼 daisyUI 5.0.35 */
✓ 185 modules transformed.
error: Uncaught (in worker "") (in promise) TypeError: Module not found "file://github.com/home/liam/work/p/project/.svelte-kit/output/server/nodes/0.js".
    at async Promise.all (index 0)
    at async analyse (file://github.com/home/liam/work/p/project/node_modules/.deno/@sveltejs+kit@2.21.1/node_modules/@sveltejs/kit/src/core/postbuild/analyse.js:86:16)
    at async file://github.com/home/liam/work/p/project/node_modules/.deno/@sveltejs+kit@2.21.1/node_modules/@sveltejs/kit/src/utils/fork.js:23:16
error: Uncaught (in promise) Error: Unhandled error. ([Object: null prototype] {
  message: 'Uncaught (in promise) TypeError: Module not found "file://github.com/home/liam/work/p/project/.svelte-kit/output/server/nodes/0.js".',
  fileName: 'file://github.com/home/liam/work/p/project/node_modules/.deno/@sveltejs+kit@2.21.1/node_modules/@sveltejs/kit/src/core/postbuild/analyse.js',
  lineNumber: 86,
  columnNumber: 16
})
    at NodeWorker.emit (ext:deno_node/_events.mjs:381:17)
    at NodeWorker.#handleError (node:worker_threads:118:10)
    at NodeWorker.#pollControl (node:worker_threads:138:30)
    at eventLoopTick (ext:core/01_core.js:178:7)

System Info

System:
    OS: Linux 6.13 undefined
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1195G7 @ 2.90GHz
    Memory: 4.82 GB / 15.34 GB
    Shell: Unknown - /run/current-system/sw/bin/bash
  npmPackages:
    @sveltejs/kit: 2.21.1 => 2.21.1
    @sveltejs/vite-plugin-svelte: ^5.0.3 => 5.0.3
    svelte: ^5.30.2 => 5.30.2
    vite: ^6.3.5 => 6.3.5

Severity

blocking an upgrade

Additional Information

No response

@bartlomieju
Copy link

Hey, Bartek from Deno team here 🖐 we're gonna investigate this on our side too.

@marvinhagemeister
Copy link

Related upstream issue denoland/deno#20945

@lucacasonato
Copy link

We're going to fix this upstream, but a possible workaround for the SvelteKit maintainers if they are interested: make the import not statically analyzable, e.g. by putting a + "" after the specifier in the import() call.

@PratyushJayachandran
Copy link

Came in to report the same issue. Just that I am using Tauri+Vite to build an app using SvelteKit.
Same error though.

@ishaan26
Copy link

ishaan26 commented May 24, 2025

Came in to report the same issue. Just that I am using Tauri+Vite to build an app using SvelteKit. Same error though.

Using the same stack. For now I replaced deno commands with npm in the tauri.config.json file. It is working fine for now.

@eltigerchino eltigerchino marked this as a duplicate of #13829 May 29, 2025
@jaysonsantos
Copy link

The fix there is either to rollback to 2.21.0 or apply a hacky patch after deno install

the patch

--- node_modules/.deno/@sveltejs+kit@2.21.1/node_modules/@sveltejs/kit/src/core/postbuild/analyse.js	2025-05-26 12:15:47
+++ node_modules/.deno/@sveltejs+kit@2.21.1/node_modules/@sveltejs/kit/src/core/postbuild/analyse.js.new	2025-05-26 12:20:05
@@ -35,11 +35,7 @@
 	env,
 	out,
 	output_config
-}) {
-	/** @type {import('@sveltejs/kit').SSRManifest} */
-	const manifest = (await import(pathToFileURL(manifest_path).href)).manifest;
-
-	/** @type {import('types').ValidatedKitConfig} */
+}) {	/** @type {import('types').ValidatedKitConfig} */
 	const config = (await load_config()).kit;

 	const server_root = join(config.outDir, 'output');
@@ -60,7 +56,6 @@
 	internal.set_private_env(private_env);
 	internal.set_public_env(public_env);
 	internal.set_safe_public_env(public_env);
-	internal.set_manifest(manifest);
 	internal.set_read_implementation((file) => createReadableStream(`${server_root}/server/${file}`));

 	const static_exports = new Map();
@@ -83,6 +78,10 @@
  		routes: new Map()
 	};

+	/** @type {import('@sveltejs/kit').SSRManifest} */
+	const manifest = (await import(pathToFileURL(manifest_path).href)).manifest;
+	internal.set_manifest(manifest);
+
 	const nodes = await Promise.all(manifest._.nodes.map((loader) => loader()));

 	// analyse nodes

then after install

patch -f -p0 < patch-svelte-kit

@bartlomieju
Copy link

FYI this is already fixed in Deno canary (deno upgrade --canary) and will be released in Deno 2.3.4 later today.

@eltigerchino
Copy link
Member

eltigerchino commented May 30, 2025

Fixed by denoland/deno#29413

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/sveltejs/kit/issues/13806

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy