Skip to content

Commit 3867e60

Browse files
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`.
1 parent 999b895 commit 3867e60

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

docs/latest/advanced/troubleshooting.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,11 @@ To debug vite plugin transformations, use
5454
[`vite-plugin-inspect`](https://github.com/antfu-collective/vite-plugin-inspect).
5555
This gives you a UI that shows all transformations of all plugins for every
5656
file.
57+
58+
## My deployment won't start
59+
60+
If your deployment doesn't boot, check the following things:
61+
62+
1. Make sure that you ran `deno task build`.
63+
2. Make sure that your entry points to the generated `_fresh/server.js` file
64+
instead of `main.ts`. The latter won't work with Fresh 2.

packages/fresh/src/app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ export class App<State> {
368368
DENO_DEPLOYMENT_ID !== undefined
369369
) {
370370
throw new Error(
371-
`Could not find _fresh directory. Maybe you forgot to run "deno task build"?`,
371+
`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"?`,
372372
);
373373
} else {
374374
buildCache = new MockBuildCache([], this.config.mode);

0 commit comments

Comments
 (0)