You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
remote_module_pattern matches dependency files named remote.js and breaks the build #16473
After #16382 (@sveltejs/kit@3.0.0-next.11), remote_module_pattern (/[/.]remote(\.[^/]+)+$/) treats any file named remote.js as a remote module — including files in node_modules.
Reproduction
I encountered this with jose (via @auth/sveltekit): its jwks/remote.js was emitted as a remote entry and the build failed.
Logs
Error: `createRemoteJWKSet` exported from node_modules/.pnpm/jose@6.2.3/node_modules/jose/dist/webapi/jwks/remote.js is invalid — all exports from this file must be remote functions
Our plan for solving this is to only treat these files as remote modules if the package they belong to has a peer dependency on @sveltejs/kit (since it would need that in order to use $app/server, without which it can't export remote functions)
Reacted by Valentin Schabschneider and Andrew Jacobs
Activity
Rich-Harris commentedon Jul 22, 2026
Our plan for solving this is to only treat these files as remote modules if the package they belong to has a peer dependency on
@sveltejs/kit(since it would need that in order to use$app/server, without which it can't export remote functions)remote.tsfromnode_modules#16583 as a duplicate of this issuefix: require a @sveltejs/kit peer dependency for remote modules in no…