Antes de configurar os plugins do editor, você precisa instalar globalmente os binários necessários.
(Recomendado) Através do Npm/Yarn
|Plataforma||Comando de Instalação|
|Windows||Por favor, veja https://github.com/reasonml/reasonml.github.io/issues/195|
Note: Bundles are currently large (approximately
npmwill not provide accurate progress of the download. This may take several minutes, depending on your connection. Be patient. In most cases, the installation is not hanging and will finish.
(Alternativa) Através do OPAM
OPAM is the native package manager for OCaml. If you come from OCaml and don't have npm/yarn, you can optionally install this way, but be careful!
If you're on Windows, please see https://github.com/reasonml/reasonml.github.io/issues/195.
opam update eval $(opam config env) opam install reason.3.2.0 merlin.2.5.4
Resolução de Problemas
Erro de Instalação
If your installation fails, it might be because you're on npm 5.4.0 (
npm --version). There was a known bug in npm that's fixed in 5.4.2. Upgrade
npm and things should work.
If that fails, try https://github.com/reasonml/reasonml.github.io/pull/157. If that succeeds, please upvote that issue. We aren't sure it's the adequate fix in the meantime.
Finally, if things still don't work, please file an issue at https://github.com/reasonml/reason-cli/issues. Sorry for the trouble.
O Plugin do Editor não está funcionando
- Se você estiver no Windows, o suporte atual para a ferramentas de edição é instável. Por favor nos ajude a melhorá-lo em https://github.com/reasonml/reasonml.github.io/issues/195. Obrigado!
- Certifique-se de reiniciar o seu editor. Alguns deles podem não identificar seu novo ambiente shell (que agora inclui os novos binários instalados) sem reiniciar.
- Tente o seguinte: ```readlink
which ocamlmerlin refmt ocamlmerlin-reason```` Isso deveria mostrar 3 caminhos que contenham a palavrareason-cli
se oreason-cli` for instalado devidamente.
- Verifique a versão do Merlin:
ocamlmerlin -versionIsso deveria dizer "The Merlin toolkit version 2.5.x, for OCaml 4.02.3". E não OCaml 4.03, e nem 4.04, etc.
Mensagem de Erro do Editor: Unbound Module
Make sure you've built your project at least once; the diagnosis doesn't pick up until after that. The build command varies by project, but is frequently
npm run build (which usually calls
bsb -make-world under the hood).
If you're on Visual Studio Code, make sure you open the editor at the project's root (where
bsconfig.json are). You can do so, for example, by invoking
code . in the terminal at the root.