Spatchy
Spatchy2mo 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.
4 Replies
fry69
fry692mo 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). Also make sure you are on the latest Deno version, e.g. upgrade with:
deno upgrade
deno upgrade
Spatchy
SpatchyOP2mo ago
after running deno install -r --allow-scripts I get the same error:
error: script 'postinstall' in '@tailwindcss/oxide@4.1.13' failed with exit code 1
stderr:
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)
error: script 'postinstall' in '@tailwindcss/oxide@4.1.13' failed with exit code 1
stderr:
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)
This is a brand new installation of Deno 2.5.0 on Nobara Linux via the install script. I've also tried uninstalling and reinstalling via Nix and get the same result.
Current Deno version: v2.5.0
Looking up stable version

Local deno version 2.5.0 is the most recent release
Current Deno version: v2.5.0
Looking up stable version

Local deno version 2.5.0 is the most recent release
fry69
fry692mo ago
Looks like switching to the canary build with:
deno upgrade canary
deno upgrade canary
fixes this problem, see this comment -> https://github.com/denoland/fresh/issues/3432#issuecomment-3291250105
Spatchy
SpatchyOP2mo ago
YES IT DOES! Thank you, just my luck to start working with a tool while there's a bug like this on the main release 😂

Did you find this page helpful?