Pages

Monday, September 16, 2019

How to located the installed & cache directory path for Deno?


Recently, I had installed the Deno v0.18.0 using brew on macOS. Then tried couple of samples given there. I was amazed to see, how closely it behaves like Golang. When we run the script for the first time, Deno downloads all the dependencies provided in the import statement that is required to run the script. When I ran the same script next time then it doesn't download any dependency. So that means it caches all those dependencies and uses the same next time.

Now I was eager to see the cache, but can't find it at the usual locations but after some time with the help of Google, I was able to find the correct location. So I thought it would be pretty useful to put it in blog for ready reckoner.

So here is the sample path on all major platforms

Platform / Location
Binary
Cache
Windows
C:\Users\me\AppData\Roaming\deno\
C:\Users\me\AppData\Local\deno\
macOS
/Users/me/.local/bin/
/Users/me/Library/Caches/deno/
Linux
/home/me/.local/bin/
/home/me/.cache/deno/

Here is the same path using the bat / bash syntax

Platform / Location
Binary
Cache
Windows
%appdata%\deno\
%localappdata%\deno\
macOS
$HOME/.local/bin/
$HOME/Library/Caches/deno/
Linux
$HOME/.local/bin/
${XDG_CACHE_HOME-$HOME/.cache}/deno/

That's it!

No comments:

Post a Comment