denoland / denoland/deploy_feedback

Fresh 2.2.0: Warmup fails with 'Module not found _fresh/server.js' despite successful build

Open
#935 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
79
Forks
5
PR merge metrics
No merged PRs in 30d

Description

## Environment
- Fresh 2.2.0 (@fresh/core 2.2.0, @fresh/plugin-vite 1.0.8)
- Vite 7.3.1, Preact 10.27.2
- Deno 2.7.1
- Deno Deploy: console.deno.com, EU region (ams)
- Framework preset: Fresh
- Source: GitHub (damir-majer/coaching-planner)
- nodeModulesDir: auto

## Steps to Reproduce
1. Create a Fresh 2.2.0 project with `deno run -Ar jsr:@fresh/init`
2. Connect to Deno Deploy via GitHub with Fresh preset
3. Install: `deno install`, Build: `deno task build`
4. Push to trigger deploy

## Expected
App deploys and serves correctly.

## Actual
- Prepare: OK
- Install (`deno install`): OK (2.5s)
- Build (`deno task build`): OK (10.7s) — Vite builds client + server successfully
- Warmup: **FAILED** — `Module not found "file:///_fresh/server.js"`

## Analysis
The Vite build produces `_fresh/server.js` (verified locally — it's a 117-byte wrapper generated by `@fresh/plugin-vite`'s `serverEntryPlugin`). The file definitely exists after build. But the "Native Fresh integration" runtime cannot find it.

The `_fresh/server.js` content (generated by Fresh plugin):
```js
import server, { registerStaticFile } from "./server/server-entry.mjs";

export default {
fetch: server.fetch
};
```

Also generates `_fresh/compiled-entry.js` which calls `Deno.serve()`.

## Attempted Workarounds (all failed)
- Local upload via `deno deploy` CLI (same error)
- Custom entrypoint via No Preset + Dynamic App (files not found at runtime)
- Custom vite.config.ts to change output path
- nodeModulesDir: manual vs auto
- Multiple app recreations with different configs

## Repo
https://github.com/damir-majer/coaching-planner

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.