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
Building is fine, but executing the build in a separate environment breaks.
I rolled back the adapter-node to next.12 and everything worked fine again.
Reproduction
plain sveltekit app, update to latest pre release, build the app, build this docker image and then execute it.
FROM node:26.8.1-alpine3.24@sha256:2d984a15c9b54fd0aeb608b8e0d0d83529eb34d2966db27a1fb4f1edc3d298a3
COPY --chown=node:node build /app
USER node
CMD ["app/index.js"]
Logs
node:internal/modules/package_json_reader:331
throw new ERR_MODULE_NOT_FOUND(packageName, fileURLToPath(base), null);
^
Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@sveltejs/kit' imported from /app/server/chunks/internal.js
at Object.getPackageJSONURL (node:internal/modules/package_json_reader:331:9)
at packageResolve (node:internal/modules/esm/resolve:784:25)
at moduleResolve (node:internal/modules/esm/resolve:873:18)
at defaultResolve (node:internal/modules/esm/resolve:1006:11)
at #cachedDefaultResolve (node:internal/modules/esm/loader:708:20)
at #resolveAndMaybeBlockOnLoaderThread (node:internal/modules/esm/loader:728:38)
at ModuleLoader.resolveSync (node:internal/modules/esm/loader:766:56)
at #resolve (node:internal/modules/esm/loader:690:17)
at ModuleLoader.getOrCreateModuleJob (node:internal/modules/esm/loader:610:35)
at ModuleJob.syncLink (node:internal/modules/esm/module_job:277:33) {
code: 'ERR_MODULE_NOT_FOUND'
}
Node.js v26.8.1
Activity
teemingc commentedon Sep 25, 2026
Really sorry about this one. A quick workaround is to add the following setting to your
vite.config.ts:I'm working on a patch and a test that will be out shortly.
teemingc commentedon Sep 25, 2026
Updated my comment with the fix. It has to be
ssr.noExternal: trueso that transitive deps are bundled too