Also, since it looks like your error is coming from ocamllsp, it would be helpful to run the build directly and get the full error that way, e.g. dune build.
I do find with neovim+lsp sometimes I need to reload a file to clear an error. Particularly in cases where I may have restructured the code and maybe created a couple of new modules.