Unbound value error when running "dune build"
cassidoxa opened this issue · comments
When I try to run dune build
I get the following error:
File "src/colors.ml", line 5, characters 8-26:
Error: Unbound value Color.of_hexstring
Hint: Did you mean to_hexstring?
I tried following the hint and got a type error.
Thanks for reporting!
I cannot reproduce. Just to make sure, you've set up opam like this?
$ opam init
$ opam switch 4.07.0
$ opam install dune core lwt re color sexp_pretty
During opam init, did you let it add the opam config hook to your shell init? Like this in your .bashrc or .zshrc:
# OPAM configuration
. /home/alex/.opam/opam-init/init.zsh > /dev/null 2> /dev/null || true
You might need to reload your terminal
The reason I ask is because I suspect an old version of the Color library is being pulled in without this commit: anuragsoni/color@3449ab9#diff-3b911a16cb75f078b7c3ccd2682c5e09
So if you aren't on OCaml 4.07.0 that might explain why.
Thanks for the help. Your suspicions were correct. I'm running debian 9 stable which was using an old version of opam that pulled in an old version of color. Updating to color 0.2.0 fixed the issue