-
-
Notifications
You must be signed in to change notification settings - Fork 17
Description
Describe the bug
A fresh Sveltekit project with remote functions can't build with rolldown.
It fails with:
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/alexbjorlig/sveltekit-remote-fn/.svelte-kit/output/server/chunks/remote-n8jbeq.js'
Reproduction
https://github.com/21RISK/sveltekit-remote-fn-rolldown-issue
Steps to reproduce
Clone repo, npm i and then npm run build.
System Info
System:
OS: macOS 26.0.1
CPU: (8) arm64 Apple M2
Memory: 135.42 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.12.0 - /Users/alexbjorlig/.nvm/versions/node/v22.12.0/bin/node
npm: 11.6.0 - /Users/alexbjorlig/.nvm/versions/node/v22.12.0/bin/npm
Browsers:
Chrome: 141.0.7390.108
Edge: 141.0.3537.92
Safari: 26.0.1
npmPackages:
rolldown-vite: 7.1.19Used Package Manager
npm
Logs
Error [ERR_MODULE_NOT_FOUND]
```shell npm run buildsveltekit-remote-fn@0.0.1 build
vite build
1:04:53 PM [vite-plugin-svelte] !!! Support for rolldown-vite in vite-plugin-svelte is experimental (rolldown: 1.0.0-beta.44, vite: 7.1.19) !!!
See sveltejs/vite-plugin-svelte#1143 for a list of known issues and to report feedback.
You or a plugin you are using have set optimizeDeps.esbuildOptions but this option is now deprecated. Vite now uses Rolldown to optimize the dependencies. Please use optimizeDeps.rollupOptions instead.
rolldown-vite v7.1.19 building SSR bundle for production...
✓ 186 modules transformed.
node:internal/event_target:1101
process.nextTick(() => { throw err; });
^
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/alexbjorlig/sveltekit-remote-fn/.svelte-kit/output/server/chunks/remote-n8jbeq.js' imported from /Users/alexbjorlig/sveltekit-remote-fn/.svelte-kit/output/server/manifest-full.js
at finalizeResolution (node:internal/modules/esm/resolve:275:11)
at moduleResolve (node:internal/modules/esm/resolve:932:10)
at defaultResolve (node:internal/modules/esm/resolve:1056:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:654:12)
at #cachedDefaultResolve (node:internal/modules/esm/loader:603:25)
at ModuleLoader.resolve (node:internal/modules/esm/loader:586:38)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:242:38)
at onImport.tracePromise.proto (node:internal/modules/esm/loader:546:36)
at TracingChannel.tracePromise (node:diagnostics_channel:344:14)
at ModuleLoader.import (node:internal/modules/esm/loader:545:21) {
code: 'ERR_MODULE_NOT_FOUND',
url: 'file:///Users/alexbjorlig/sveltekit-remote-fn/.svelte-kit/output/server/chunks/remote-n8jbeq.js'
}
Node.js v22.12.0
</details>
### Validations
- [x] Follow our [Code of Conduct](https://github.com/vitejs/rolldown-vite/blob/main/CODE_OF_CONDUCT.md)
- [x] Read the [Contributing Guidelines](https://github.com/vitejs/rolldown-vite/blob/main/CONTRIBUTING.md).
- [x] Read the [docs](https://vite.dev/guide) and the [Rolldown-related guide](https://main.vite.dev/guide/rolldown.html).
- [x] Check that there isn't [already an issue](https://github.com/vitejs/rolldown-vite/issues) that reports the same bug to avoid creating a duplicate.
- [x] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/vitejs/rolldown-vite/discussions) or join our [Discord Chat Server](https://chat.vite.dev/).
- [x] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.