Homebrew's OCaml symlink overwritten after installing
Executing npm install -g git://github.com/reasonml/reason-cli.git#beta-v-1.13.5 overwrote homebrew's OCaml symlink.
Before executing the installation, ocaml -version was 4.04.1 and afterwards it was 4.02.3.
I had to re-link the package in brew with:
brew unlink ocaml && brew link ocaml
brew link --overwrite ocaml
Note: I am new to OCaml.
Have something similar. Installation of ocaml was totally broken. Need to uninstall everything and reinstal without reason-cli
So, reason-cli just uses npm global binaries. This is a conflict between brew and npm. I'm curious what should happen if brew installs binary xyz and then npm installs xyz globally as well. Who should win? What if it occurs in the opposite install order? Should brew be able to shadow npm?
If you don't want global binaries shadowing paths, you can now install reason-cli as a local project dependency. (Just don't pass -g at install time). You then need to make sure that the project's node_modules/.bin directory is in your PATH when starting your editor.
My story is: I wanted to try BetterErrors. BetterErrors recommends do this
To install BetterErrors we recommend installing reason-cli which ships with BetterErrors by default.
I had no intention to use reason or compilation to js, because I want write some OCaml code. But probably it was my error in first place, when I blindly followed the advice from BetterErrors :/
FIx for me was:
rm -rf /opt/boxen/nodenv/shims/ocamlc
rm -rf /opt/boxen/nodenv/shims/ocamlopt
Same issue with my ocaml editor setup (ocp-indent) after installing reason-cli globally. Hopefully installing it locally will fix this. I use VIM btw
Thanks for the feedback. The latest release no longer installs ocamlopt etc. You'll have to clean up the existing links (npm remove -g reason-cli).