Spatchy
Spatchy4h ago

`Uncaught TypeError: callback is not a function` On clean Fresh init project

I've just initialised a new Fresh project with deno run -Ar jsr:@fresh/init . I have made no changes to the newly initialised project yet. upon running deno task dev I see the following output:
VITE v7.1.5 ready in 1062 ms

➜ Local: http://127.0.0.1:5173/
➜ Network: use --host to expose
➜ press h + enter to show help
error: Uncaught TypeError: callback is not a function
at ext:deno_node/_fs/_fs_close.ts:17:5
at callback (ext:deno_web/02_timers.js:58:7)
at eventLoopTick (ext:core/01_core.js:214:13)
VITE v7.1.5 ready in 1062 ms

➜ Local: http://127.0.0.1:5173/
➜ Network: use --host to expose
➜ press h + enter to show help
error: Uncaught TypeError: callback is not a function
at ext:deno_node/_fs/_fs_close.ts:17:5
at callback (ext:deno_web/02_timers.js:58:7)
at eventLoopTick (ext:core/01_core.js:214:13)
These files seem to be core to Deno itself, they aren't included in my source as far as I can tell.
1 Reply
fry69
fry694h ago
This maybe an outdated Deno cache, try this first inside the example app:
deno install -r --allow-scripts
deno install -r --allow-scripts
Otherwise I use example Fresh apps constantly and they all work (until I break them on purpose).

Did you find this page helpful?