Skip to content

@sveltejs/adapter-auto not detecting Cloudflare Workers #15060

@hyunbinseo

Description

@hyunbinseo

Describe the bug

In Cloudflare Workers, this combination:

  • .node-version file
  • no lockfile

Results in Node.js and bun install

Detected the following tools from environment: nodejs@24.12.0, bun@1.2.15
Installing nodejs 24.12.0
Installing project dependencies: bun install

Which fails to detect the production environment:

Using @sveltejs/adapter-auto
Could not detect a supported production environment. See https://svelte.dev/docs/kit/adapters to learn how to configure your app to run on the platform of your choosing

Reproduction

https://github.com/hyunbinseo/svelte-kit-template/tree/cloudflare-workers

Logs

2025-12-14T15:16:11.196Z	Initializing build environment...
2025-12-14T15:16:12.556Z	Success: Finished initializing build environment
2025-12-14T15:16:12.953Z	Cloning repository...
2025-12-14T15:16:13.931Z	No build output detected to cache. Skipping.
2025-12-14T15:16:13.931Z	No dependencies detected to cache. Skipping.
2025-12-14T15:16:20.389Z	Detected the following tools from environment: nodejs@24.12.0, bun@1.2.15
2025-12-14T15:16:20.390Z	Installing nodejs 24.12.0
2025-12-14T15:16:11.196Z	Initializing build environment...
2025-12-14T15:16:12.556Z	Success: Finished initializing build environment
2025-12-14T15:16:12.953Z	Cloning repository...
2025-12-14T15:16:13.931Z	No build output detected to cache. Skipping.
2025-12-14T15:16:13.931Z	No dependencies detected to cache. Skipping.
2025-12-14T15:16:20.389Z	Detected the following tools from environment: nodejs@24.12.0, bun@1.2.15
2025-12-14T15:16:20.390Z	Installing nodejs 24.12.0
2025-12-14T15:16:25.238Z	Installing project dependencies: bun install
2025-12-14T15:16:26.548Z	[3.55ms] ".env"
2025-12-14T15:16:26.557Z	bun install v1.2.15 (df017990)
2025-12-14T15:16:26.586Z	Resolving dependencies
2025-12-14T15:16:35.263Z	Resolved, downloaded and extracted [1100]
2025-12-14T15:16:36.469Z	Saved lockfile
2025-12-14T15:16:36.470Z	
2025-12-14T15:16:36.470Z	$ svelte-kit sync || echo ''
2025-12-14T15:16:37.511Z	
2025-12-14T15:16:37.513Z	+ @eslint/compat@2.0.0
2025-12-14T15:16:37.514Z	+ @eslint/js@9.39.2
2025-12-14T15:16:37.514Z	+ @sun-typeface/suit@2.0.5
2025-12-14T15:16:37.515Z	+ @sveltejs/adapter-auto@7.0.0
2025-12-14T15:16:37.515Z	+ @sveltejs/kit@2.49.2
2025-12-14T15:16:37.516Z	+ @sveltejs/vite-plugin-svelte@6.2.1
2025-12-14T15:16:37.518Z	+ @tailwindcss/forms@0.5.10
2025-12-14T15:16:37.518Z	+ @tailwindcss/vite@4.1.18
2025-12-14T15:16:37.519Z	+ @types/node@24.10.4 (v25.0.2 available)
2025-12-14T15:16:37.521Z	+ eslint@9.39.2
2025-12-14T15:16:37.521Z	+ eslint-config-prettier@10.1.8
2025-12-14T15:16:37.521Z	+ eslint-plugin-svelte@3.13.1
2025-12-14T15:16:37.521Z	+ globals@16.5.0
2025-12-14T15:16:37.524Z	+ jose@6.1.3
2025-12-14T15:16:37.527Z	+ prettier@3.7.4
2025-12-14T15:16:37.527Z	+ prettier-plugin-svelte@3.4.0
2025-12-14T15:16:37.528Z	+ prettier-plugin-tailwindcss@0.7.2
2025-12-14T15:16:37.528Z	+ svelte@5.46.0
2025-12-14T15:16:37.528Z	+ svelte-check@4.3.4
2025-12-14T15:16:37.530Z	+ tailwindcss@4.1.18
2025-12-14T15:16:37.530Z	+ typescript@5.9.3
2025-12-14T15:16:37.531Z	+ typescript-eslint@8.49.0
2025-12-14T15:16:37.531Z	+ valibot@1.2.0
2025-12-14T15:16:37.531Z	+ vite@7.2.7
2025-12-14T15:16:37.531Z	+ wrangler@4.54.0
2025-12-14T15:16:37.531Z	
2025-12-14T15:16:37.531Z	233 packages installed [12.14s]
2025-12-14T15:16:37.671Z	Executing user build command: node --run build
2025-12-14T15:16:48.470Z	vite v7.2.7 building ssr environment for production...
2025-12-14T15:16:48.514Z	transforming...
2025-12-14T15:16:49.743Z	✓ 206 modules transformed.
2025-12-14T15:16:49.846Z	rendering chunks...
2025-12-14T15:16:50.453Z	vite v7.2.7 building client environment for production...
2025-12-14T15:16:50.459Z	transforming...
2025-12-14T15:16:51.414Z	✓ 168 modules transformed.
2025-12-14T15:16:51.488Z	rendering chunks...
2025-12-14T15:16:51.548Z	computing gzip size...
2025-12-14T15:16:51.561Z	.svelte-kit/output/client/_app/version.json                                     0.03 kB │ gzip:  0.05 kB
2025-12-14T15:16:51.561Z	.svelte-kit/output/client/.vite/manifest.json                                   3.12 kB │ gzip:  0.63 kB
2025-12-14T15:16:51.561Z	.svelte-kit/output/client/_app/immutable/assets/SUIT-Variable.gqD86R3M.woff2  624.54 kB
2025-12-14T15:16:51.561Z	.svelte-kit/output/client/_app/immutable/assets/2.DbZHCSLt.css                  0.36 kB │ gzip:  0.24 kB
2025-12-14T15:16:51.562Z	.svelte-kit/output/client/_app/immutable/assets/0.CHko16eK.css                 13.33 kB │ gzip:  3.54 kB
2025-12-14T15:16:51.562Z	.svelte-kit/output/client/_app/immutable/entry/start.RWU3hlsv.js                0.08 kB │ gzip:  0.09 kB
2025-12-14T15:16:51.562Z	.svelte-kit/output/client/_app/immutable/chunks/B7OwilHR.js                     0.11 kB │ gzip:  0.13 kB
2025-12-14T15:16:51.562Z	.svelte-kit/output/client/_app/immutable/chunks/Ba1bqYIH.js                     0.18 kB │ gzip:  0.14 kB
2025-12-14T15:16:51.562Z	.svelte-kit/output/client/_app/immutable/chunks/BiDYnakw.js                     0.35 kB │ gzip:  0.26 kB
2025-12-14T15:16:51.562Z	.svelte-kit/output/client/_app/immutable/nodes/1.AS4O5xbF.js                    0.86 kB │ gzip:  0.52 kB
2025-12-14T15:16:51.563Z	.svelte-kit/output/client/_app/immutable/nodes/0.BcHLcWbe.js                    5.49 kB │ gzip:  2.90 kB
2025-12-14T15:16:51.563Z	.svelte-kit/output/client/_app/immutable/entry/app.WWYurSqw.js                  6.52 kB │ gzip:  3.10 kB
2025-12-14T15:16:51.563Z	.svelte-kit/output/client/_app/immutable/chunks/ChRcIiss.js                     6.52 kB │ gzip:  3.04 kB
2025-12-14T15:16:51.563Z	.svelte-kit/output/client/_app/immutable/nodes/2.B6DGeXcR.js                   28.62 kB │ gzip: 11.51 kB
2025-12-14T15:16:51.563Z	.svelte-kit/output/client/_app/immutable/chunks/DB_qSe21.js                    29.06 kB │ gzip: 11.39 kB
2025-12-14T15:16:51.563Z	.svelte-kit/output/client/_app/immutable/chunks/onhwaM3W.js                    33.62 kB │ gzip: 12.92 kB
2025-12-14T15:16:51.563Z	✓ built in 1.11s
2025-12-14T15:16:52.145Z	vite v7.2.7 building client environment for production...
2025-12-14T15:16:52.152Z	transforming...
2025-12-14T15:16:52.157Z	✓ 2 modules transformed.
2025-12-14T15:16:52.162Z	rendering chunks...
2025-12-14T15:16:52.163Z	computing gzip size...
2025-12-14T15:16:52.164Z	.svelte-kit/output/client/service-worker.mjs  1.17 kB │ gzip: 0.56 kB
2025-12-14T15:16:52.166Z	✓ built in 18ms
2025-12-14T15:16:52.166Z	.svelte-kit/output/server/.vite/manifest.json                                   4.69 kB
2025-12-14T15:16:52.166Z	.svelte-kit/output/server/_app/immutable/assets/SUIT-Variable.gqD86R3M.woff2  624.54 kB
2025-12-14T15:16:52.166Z	.svelte-kit/output/server/_app/immutable/assets/_page.DbZHCSLt.css              0.36 kB
2025-12-14T15:16:52.168Z	.svelte-kit/output/server/_app/immutable/assets/_layout.BwjYcKCn.css           13.35 kB
2025-12-14T15:16:52.168Z	.svelte-kit/output/server/entries/pages/_page.ts.js                             0.06 kB
2025-12-14T15:16:52.168Z	.svelte-kit/output/server/chunks/remote-14dkmo.js                               0.06 kB
2025-12-14T15:16:52.168Z	.svelte-kit/output/server/chunks/environment.js                                 0.19 kB
2025-12-14T15:16:52.169Z	.svelte-kit/output/server/chunks/equality.js                                    0.33 kB
2025-12-14T15:16:52.169Z	.svelte-kit/output/server/entries/fallbacks/error.svelte.js                     0.35 kB
2025-12-14T15:16:52.169Z	.svelte-kit/output/server/internal.js                                           0.38 kB
2025-12-14T15:16:52.169Z	.svelte-kit/output/server/chunks/server.js                                      0.48 kB
2025-12-14T15:16:52.169Z	.svelte-kit/output/server/chunks/index2.js                                      1.12 kB
2025-12-14T15:16:52.169Z	.svelte-kit/output/server/chunks/utils.js                                       1.15 kB
2025-12-14T15:16:52.169Z	.svelte-kit/output/server/chunks/ids.remote.js                                  1.22 kB
2025-12-14T15:16:52.169Z	.svelte-kit/output/server/chunks/hooks.server.js                                1.24 kB
2025-12-14T15:16:52.169Z	.svelte-kit/output/server/chunks/shared.js                                      1.34 kB
2025-12-14T15:16:52.169Z	.svelte-kit/output/server/entries/pages/_layout.svelte.js                       1.90 kB
2025-12-14T15:16:52.169Z	.svelte-kit/output/server/entries/pages/_page.svelte.js                         2.43 kB
2025-12-14T15:16:52.169Z	.svelte-kit/output/server/chunks/async.js                                       3.13 kB
2025-12-14T15:16:52.169Z	.svelte-kit/output/server/remote-entry.js                                       4.47 kB
2025-12-14T15:16:52.169Z	.svelte-kit/output/server/chunks/form.js                                        6.76 kB
2025-12-14T15:16:52.169Z	.svelte-kit/output/server/chunks/exports.js                                     6.97 kB
2025-12-14T15:16:52.169Z	.svelte-kit/output/server/chunks/query.js                                       8.36 kB
2025-12-14T15:16:52.169Z	.svelte-kit/output/server/chunks/form-utils.js                                 16.45 kB
2025-12-14T15:16:52.169Z	.svelte-kit/output/server/chunks/index.js                                      31.25 kB
2025-12-14T15:16:52.169Z	.svelte-kit/output/server/chunks/internal.js                                   76.48 kB
2025-12-14T15:16:52.169Z	.svelte-kit/output/server/index.js                                            126.61 kB
2025-12-14T15:16:52.170Z	✓ built in 3.67s
2025-12-14T15:16:52.170Z	
2025-12-14T15:16:52.170Z	Run npm run preview to preview your production build locally.
2025-12-14T15:16:52.174Z	
2025-12-14T15:16:52.174Z	> Using @sveltejs/adapter-auto
2025-12-14T15:16:52.174Z	  Could not detect a supported production environment. See https://svelte.dev/docs/kit/adapters to learn how to configure your app to run on the platform of your choosing
2025-12-14T15:16:52.174Z	  ✔ done
2025-12-14T15:16:52.260Z	Success: Build command completed
2025-12-14T15:16:52.412Z	Executing user deploy command: npx wrangler deploy
2025-12-14T15:16:53.813Z	
2025-12-14T15:16:53.813Z	 ⛅️ wrangler 4.54.0
2025-12-14T15:16:53.814Z	───────────────────
2025-12-14T15:16:53.834Z	
2025-12-14T15:16:53.886Z	✘ [ERROR] The entry-point file at ".svelte-kit/cloudflare/_worker.js" was not found.
2025-12-14T15:16:53.887Z	
2025-12-14T15:16:53.887Z	
2025-12-14T15:16:53.913Z	
2025-12-14T15:16:53.913Z	Cloudflare collects anonymous telemetry about your usage of Wrangler. Learn more at https://github.com/cloudflare/workers-sdk/tree/main/packages/wrangler/telemetry.md
2025-12-14T15:16:53.931Z	🪵  Logs were written to "/opt/buildhome/.config/.wrangler/logs/wrangler-2025-12-14_15-16-53_345.log"
2025-12-14T15:16:54.158Z	Failed: error occurred while running deploy command

System Info

CI

Severity

annoyance

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions