Arthurs
Arthurs•7d ago

`deno run --cached-only` downloads stuff anyways

Hey there 👋 I recently upgraded a project to deno 2.1.10. When starting the server, I noticed that deno would download a bunch of packages. DENO_DIR=build/cache TZ=UTC deno run --allow-all -- src/server.ts Which is weird because my dependencies are already in the build/cache folder. So I added --cached-only DENO_DIR=build/cache TZ=UTC deno run --cached-only --allow-all -- src/server.ts I was at least expecting an error, but it appears deno is still downloading the dependencies as if the option did not exist. What am I doing wrong ?
1 Reply
Arthurs
ArthursOP•7d ago
I understood my mistake : I was running those commands through deno task mytask. The solution was to give my local cache like this DENO_DIR=build/cache deno task mytask !

Did you find this page helpful?