Skip to content

Cloudflare Adapter 6.0 build fails #13621

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
nevil2 opened this issue Mar 21, 2025 · 2 comments · Fixed by #13622
Closed

Cloudflare Adapter 6.0 build fails #13621

nevil2 opened this issue Mar 21, 2025 · 2 comments · Fixed by #13622

Comments

@nevil2
Copy link

nevil2 commented Mar 21, 2025

Describe the bug

If I update from 5.1 (which builds successfully) to 6.0, everything is fine until the very end, when I get the following error.

15:39:56.504 | ✨ Upload complete!
15:40:00.487 | Success: Assets published!
15:40:14.132 | Error: Failed to publish your Function. Got error: Uncaught Error: No such module "server/devalue".   imported from "server/index.js"

Have no idea what is the cause. Roll back to 5.1 and it works again.

Reproduction

Cloudflare Adapter 6.0 has just been release.

I've tested using it on two different Pages projects and get the same error message.

Logs

System Info

System:
    OS: Linux 5.15 Ubuntu 22.04.5 LTS 22.04.5 LTS (Jammy Jellyfish)
    CPU: (12) x64 AMD Ryzen 5 5600X 6-Core Processor
    Memory: 4.09 GB / 15.59 GB
    Container: Yes
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 22.11.0 - /tmp/fnm_multishells/18662_1742565710598/bin/node
    npm: 11.2.0 - /tmp/fnm_multishells/18662_1742565710598/bin/npm
  npmPackages:
    @sveltejs/adapter-cloudflare: ^6.0.0 => 6.0.0
    @sveltejs/kit: ^2.15.2 => 2.20.2
    @sveltejs/vite-plugin-svelte: ^5.0.1 => 5.0.3
    svelte: ^5.16.5 => 5.24.1
    vite: ^6.0.7 => 6.2.2

Severity

blocking an upgrade

Additional Information

No response

@eltigerchino
Copy link
Member

eltigerchino commented Mar 21, 2025

Please provide a minimal reproduction in the form of a repository. To diagnose the root cause, we'd need to know:

  • what modules did you import?
  • how did you deploy your project? what command did you use?
  • etc.

Without a minimal reproduction, it's just a guessing game as to what the issue is, and there's no way to test if a solution fixes it.

@eltigerchino
Copy link
Member

eltigerchino commented Mar 21, 2025

Seems that #13610 was not a proper fix as it doesn't include the server-side dependencies.

One workaround for now would be to set vite.config.ssr.noExternal to true or to rollback to 5.1:

import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vite';

export default defineConfig({
	plugins: [sveltekit()],
+	ssr: {
+		noExternal: true
+	}
});

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

Successfully merging a pull request may close this issue.

2 participants