dillonoconnor
Hologram breaks tests: could not read file /_build/test/lib/hologram/priv/page_digest.plt": no such file or directory
I noticed when trying to run tests after installing hologram that I get the following error:
could not read file /_build/test/lib/hologram/priv/page_digest.plt": no such file or directory
I implemented a workaround that involves adding the creation of a stubbed page_digest file when using the mix test alias which does this:
def create_hologram_stub(_args) do
path = "_build/test/lib/hologram/priv"
File.mkdir_p!(path)
plt_file = Path.join(path, "page_digest.plt")
unless File.exists?(plt_file) do
File.write!(plt_file, :erlang.term_to_binary(%{}))
end
end
It solves the problem, but sure seems hacky. Is there a proper way to address this? Thanks!
Most Liked
bartblast
The page_digest.plt file is automatically generated every time the Hologram compiler runs, so this shouldn’t happen with a correct installation.
Could you create a GitHub repo that reproduces the problem? A fork of hologram_skeleton would work well for this. Without seeing the full setup, it’s hard to say what’s going wrong.
dillonoconnor
Sorry for the super delayed response. I completely reinstalled Hologram and ran through the setup steps again. For whatever reason, this error has gone away
. Not sure what caused this before but I’m glad that I don’t need my workaround anymore. Thanks!
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









