Skip to content

Svelte 2.21.11 breaks on analyse process #13829

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
jaysonsantos opened this issue May 26, 2025 · 2 comments
Closed

Svelte 2.21.11 breaks on analyse process #13829

jaysonsantos opened this issue May 26, 2025 · 2 comments

Comments

@jaysonsantos
Copy link

jaysonsantos commented May 26, 2025

Describe the bug

Hi there, whlie trying to run this template https://github.com/NextLegacy/SvelteKit-Deno-Template and updating svelte-kit to the latest version, it started breaking when running deno task build with the following error

error: Uncaught (in worker "") (in promise) TypeError: Module not found "file:///Users/jayson.reis/src/SvelteKit-Deno-Template/.svelte-kit/output/server/nodes/0.js".
    at async Promise.all (index 0)
    at async analyse (file:///Users/jayson.reis/src/SvelteKit-Deno-Template/node_modules/.deno/@sveltejs+kit@2.21.1/node_modules/@sveltejs/kit/src/core/postbuild/analyse.js:86:16)
    at async file:///Users/jayson.reis/src/SvelteKit-Deno-Template/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:///Users/jayson.reis/src/SvelteKit-Deno-Template/.svelte-kit/output/server/nodes/0.js".',
  fileName: 'file:///Users/jayson.reis/src/SvelteKit-Deno-Template/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)

I am not sure if it is something related to deno o if it is a caching when the manifest is loaded, it imports the nodes files with __memo(() => import('./nodes/0.js')) and when analyze is called, it will complain that the file does not exist even at that point it does exist.
Moving the manifest import after build_server_nodes seems to work.

        /** @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()));

Reproduction

git clone https://github.com/NextLegacy/SvelteKit-Deno-Template && cd SvelteKit-Deno-Template && sed -i'' 's#"npm:@sveltejs/kit@^2.20.5"#"npm:@sveltejs/kit@^2.21.1"#' deno.json && deno task build

Logs

System Info

System:
    OS: macOS 15.5
    CPU: (10) arm64 Apple M1 Max
    Memory: 141.83 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.18.1 - ~/.asdf/installs/nodejs/20.18.1/bin/node
    Yarn: 1.22.22 - ~/.nix-profile/bin/yarn
    npm: 10.8.2 - ~/.asdf/installs/nodejs/20.18.1/bin/npm
    bun: 1.2.13 - ~/.nix-profile/bin/bun
  Browsers:
    Chrome: 136.0.7103.114
    Safari: 18.5

Severity

blocking an upgrade

Additional Information

No response

@jaysonsantos
Copy link
Author

Not sure if it is the same as #13804

@wakuflair
Copy link

same issue in a Tauri 2.0 + Svelte + Deno app

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

3 participants