From 4d711af14f1b612762bc4407d03f0451432ff375 Mon Sep 17 00:00:00 2001 From: Marvin Hagemeister Date: Mon, 15 Sep 2025 19:05:02 +0200 Subject: [PATCH 1/2] fix: improve missing build cache error message Hoping that this helps folks who ignore the migration guide and keep the entry pointed to `main.ts`. --- packages/fresh/src/app.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/fresh/src/app.ts b/packages/fresh/src/app.ts index a7a936a59bb..b07a2a3eebe 100644 --- a/packages/fresh/src/app.ts +++ b/packages/fresh/src/app.ts @@ -368,7 +368,7 @@ export class App { DENO_DEPLOYMENT_ID !== undefined ) { throw new Error( - `Could not find _fresh directory. Maybe you forgot to run "deno task build"?`, + `Could not find _fresh directory. Maybe you forgot to run "deno task build" or maybe you're trying to run "main.ts" directly instead of "_fresh/server.js"?`, ); } else { buildCache = new MockBuildCache([], this.config.mode); From 19216c70f3fd90596067138384173efa3587de01 Mon Sep 17 00:00:00 2001 From: Marvin Hagemeister Date: Mon, 15 Sep 2025 19:12:49 +0200 Subject: [PATCH 2/2] docs: enhance troubleshooting --- docs/latest/advanced/troubleshooting.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/latest/advanced/troubleshooting.md b/docs/latest/advanced/troubleshooting.md index f981e3e5561..06bede26f97 100644 --- a/docs/latest/advanced/troubleshooting.md +++ b/docs/latest/advanced/troubleshooting.md @@ -54,3 +54,11 @@ To debug vite plugin transformations, use [`vite-plugin-inspect`](https://github.com/antfu-collective/vite-plugin-inspect). This gives you a UI that shows all transformations of all plugins for every file. + +## My deployment won't start + +If your deployment doesn't boot, check the following things: + +1. Make sure that you ran `deno task build`. +2. Make sure that your entry points to the generated `_fresh/server.js` file + instead of `main.ts`. The latter won't work with Fresh 2.