Error: Program ocamlc not found in the tree or in PATH
After setting up the template successfully, make build, make watch, etc., all fail with:
Error: Program ocamlc not found in the tree or in PATH
(context: default)
...and there really doesn't appear to be an ocamlc in PATH, or in _opam/bin, unlike in any of my other local switches. I've tried twice. There is no ocamlopt either.
Is there anything odd about how the template is set up? I've never seen this happen before. Before I continue debugging it, have you?
I've never seen this error before 😕 There's nothing special about the setup of the template, as far as I can tell, it's just running opam commands and dune commands wrapped with opam exec --.
I'm surprised the template generation succeeds, however, because the generator will build the project (with make build for you). This means that Spin was able to build the project, but you are not..
I've experienced the same error. Generating the template was not successful on macOS, but no details or a log was provided:
🏗️ Creating a new project from dream in .
Done!
🎁 Installing packages in a switch. This might take a couple minutes.
opam-spin: [ERROR] The template generation failed:
The command make deps did not run successfully: exited with code 2
Running make:
opam exec -- dune build --root . @install
Error: Program ocamlc not found in the tree or in PATH
(context: default)