fix: improve missing build cache error message (#3441)

Hoping that this helps folks who ignore the migration guide and keep the
entry pointed to `main.ts`.
This commit is contained in:
Marvin Hagemeister
2025-09-15 19:19:10 +02:00
committed by GitHub
parent 999b89501e
commit 3867e60664
2 changed files with 9 additions and 1 deletions
+8
View File
@@ -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.
+1 -1
View File
@@ -368,7 +368,7 @@ export class App<State> {
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);