Skip to content

Unable to start Fresh dev server with @cloudflare/vite-plugin #3771

@argxentakato

Description

@argxentakato

I set up a Fresh project following the instructions in Cloudflare Workers | Fresh docs, but the development server does not start when I run the deno task dev command.

  • fresh: 2.2.2
  • vite: 7.1.3
  • wrangler: 4.81.1
  • @cloudflare/vite-plugin: 1.31.2

Steps to Reproduce

  1. Create a new Fresh Project
deno run -Ar jsr:@fresh/init
  1. Create the vite.config.ts file with the following contents:
import { defineConfig } from "vite";
import { fresh } from "@fresh/plugin-vite";
import tailwindcss from "@tailwindcss/vite";
import { cloudflare } from "@cloudflare/vite-plugin";

export default defineConfig({
  plugins: [fresh(), tailwindcss(), cloudflare()],
});
  1. Create the wrangler.jsonc file with the following contents:
{
  "$schema": "./node_modules/wrangler/config-schema.json",
  "name": "argxentakato-me",
  // Set this to today's date
  "compatibility_date": "2026-04-12",
  "main": "./server.js",
  "compatibility_flags": ["nodejs_compat"],
  "observability": {
    "enabled": true,
  },
}
  1. Create the server.js file with the following contents:
import server from "./_fresh/server.js";

export default {
  fetch: server.fetch,
};
  1. Run Command deno task dev

Expected behavior

Start dev server.

$ deno task dev
Task dev vite

  VITE v7.3.2  ready in 573 ms

  ➜  Local:   http://127.0.0.1:5173/
  ➜  Network: use --host to expose
  ➜  press h + enter to show help

...

Actual behavior

No logs are output, and it terminates immediately.

$ deno task dev
Task dev vite
$

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions