-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
Describe the bug
#14736 and by extension this PR #14682 might be related to this
Environment:
- SvelteKit version:
2.47.0 - Vite version:
[email protected](via npm alias) - Rolldown version:
1.0.0-beta.43(from the build output) - Node.js version: You can get this with
node --version - Package manager: bun
Description:
When building with rolldown-vite as a Vite replacement, SvelteKit remote functions fail during the build process with an ENOENT error. The vite-plugin-sveltekit-remote plugin tries to read a remote chunk file that doesn't exist, but similar files with different hashes are present.
Error:**
[plugin vite-plugin-sveltekit-remote]
Error: ENOENT: no such file or directory, open '/Users/user/VSCode/project/front/.svelte-kit/output/server/chunks/remote-1mjzu66.js'
**Configuration:
// svelte.config.js - node adapter
kit: {
adapter: adapter({ precompress: true }),
experimental: {
remoteFunctions: true,
},
}
// package.json overrides
"overrides": {
"vite": "npm:rolldown-vite@latest"
}
Expected behavior:** Build should succeed as it does with regular Vite
Actual behavior: Build fails when trying to read remote function chunks
Additional context:
- The build works fine with regular Vite
- Remote chunk files are generated but with different hashes than expected
- Build output shows: `Rollup >=4.52.0 is recommended when using SvelteKit remote functions as it fixes some bugs related to code-splitting. Current version: 4.23.0
IMPORTANT NOTES:
- My Repro may not actually produce the issue - It's a private repo from our company, and I am struggling to get rolldown working in stackblitz. Any input on how to best respro this would be appreciated, I can understand if this issue get's closed or ignored because of this, sorry.
- the description here was generated by an LLM, I am far not knowledgable enough about this topic, can look for some stuff though
Reproduction
https://stackblitz.com/edit/sveltejs-kit-template-default-e8mz9uvv?file=package.json
Logs
...
transforming (5100) node_modules/bits-ui/dist/bits/utilities/dismissible-layer/use-dismissable-layer.svelte.js vite:resolve 0.04ms tailwindcss -> null +115ms
vite:resolve 0.09ms tw-animate-css -> null +0ms
✓ 5273 modules transformed.
✗ Build failed in 5.80s
error during build:
Build failed with 1 error:
[plugin vite-plugin-sveltekit-remote]
Error: ENOENT: no such file or directory, open '/Users/user/VSCode/project/front/.svelte-kit/output/server/chunks/remote-1mjzu66.js'
at Object.readFileSync (node:fs:440:20)
at PluginContextImpl.writeBundle (file:///Users/user/VSCode/project/front/node_modules/@sveltejs/kit/src/exports/vite/index.js:834:21)
at PluginContextImpl.handler (file:///Users/user/VSCode/project/front/node_modules/vite/dist/node/chunks/dep-CErkX-mM.js:33267:13)
at plugin (file:///Users/user/VSCode/project/front/node_modules/rolldown/dist/shared/src-DucjDcdj.mjs:3079:18)
at plugin.<computed> (file:///Users/user/VSCode/project/front/node_modules/rolldown/dist/shared/src-DucjDcdj.mjs:3340:18)
at aggregateBindingErrorsIntoJsError (file:///Users/user/VSCode/project/front/node_modules/rolldown/dist/shared/src-DucjDcdj.mjs:2172:18)
at unwrapBindingResult (file:///Users/user/VSCode/project/front/node_modules/rolldown/dist/shared/src-DucjDcdj.mjs:2147:128)
at RolldownBuild.write (file:///Users/user/VSCode/project/front/node_modules/rolldown/dist/shared/src-DucjDcdj.mjs:4137:34)
at async buildEnvironment (file:///Users/user/VSCode/project/front/node_modules/vite/dist/node/chunks/dep-CErkX-mM.js:33029:64)
at async Object.build (file:///Users/user/VSCode/project/front/node_modules/vite/dist/node/chunks/dep-CErkX-mM.js:33431:19)
at async Object.buildApp (file:///Users/user/VSCode/project/front/node_modules/vite/dist/node/chunks/dep-CErkX-mM.js:33428:153)
at async CAC.<anonymous> (file:///Users/user/VSCode/project/front/node_modules/vite/dist/node/cli.js:629:3)
error: script "build" exited with code 1System Info
System:
OS: macOS 26.0.1
CPU: (10) arm64 Apple M1 Max
Memory: 2.26 GB / 64.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 24.9.0 - /opt/homebrew/bin/node
npm: 11.6.0 - /opt/homebrew/bin/npm
bun: 1.3.0 - /Users/nicolasmontavon/.bun/bin/bun
Browsers:
Chrome: 141.0.7390.108
Firefox: 143.0.1
Safari: 26.0.1
npmPackages:
@sveltejs/adapter-node: ^5.4.0 => 5.4.0
@sveltejs/kit: ^2.47.0 => 2.47.0
@sveltejs/vite-plugin-svelte: ^6.2.1 => 6.2.1
rolldown-vite: 7.1.17
svelte: ^5.40.1 => 5.40.1Severity
serious, but I can work around it
Additional Information
No response