Search code examples
elixirelixir-mix

Error when fetching offline hexdocs for Elixir core & kernel


I can run mix hex.docs online timex to open the latest online docs for the timex package, and I can run mix hex.docs offline timex to download a cache of those same timex docs and open them offline in the browser, which is super handy during flights etc.

Likewise, I can run mix hex.docs online elixir to open the latest online docs for the Elixir core library. But when I run mix hex.docs offline elixir (the offline equivalent), I get the following error:

Couldn't find docs for package with name elixir or version 1.13.3

Is this a bug? Or am I using the command incorrectly? What's the easiest way for me to cache and open an offline copy of the Elixir core hexdocs?


Solution

  • It works for me:

    $ mix hex.docs offline elixir
    Docs fetched: /Users/adam/.hex/docs/hexpm/elixir/1.14.2
    

    Are you using the latest version of hex? Try mix local.hex.