Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

Manual Steps to Run on Windows with reason-react #35

Open
mattferrin opened this issue Jun 12, 2017 · 10 comments
Open

Manual Steps to Run on Windows with reason-react #35

mattferrin opened this issue Jun 12, 2017 · 10 comments

Comments

@mattferrin
Copy link

mattferrin commented Jun 12, 2017

Compiler Missing

Install g++ compiler by selecting it as an option while using installer at http://www.mingw.org/

Add
C:\MinGW\bin
to your Path.

Non-Windows Unix Syntax

cd C:\
git clone https://github.com/reasonml/reason-cli.git

Change package.json line:
"postinstall": "./scripts/performActualInstallAndFixLinks.sh"
to
"postinstall": ".\scripts\performActualInstallAndFixLinks.sh"

Possibly Unnecessary

Enable Bash and Developer Mode:
https://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/

Install
cd C:\
npm install -g ./reasonml

Check
where ocamlmerlin refmt ocamlmerlin-reason

Test

npm install --save reason-react

Follow steps:
https://github.com/chenglou/reason-react-example

Edit the simple example to not say hello, and open it's index.html file in Chrome.

@mattferrin mattferrin changed the title Manual Steps to Run on Windows with react-reasonreason react Manual Steps to Run on Windows with reason-react Jun 12, 2017
@chenglou
Copy link
Member

@mattferrin oh gosh we've totally missed this issue. To be clear, this works under 1.13.5 right? The latest 1.13.5 release gives prebuilt binaries and is a bit different

@mattferrin
Copy link
Author

@chenglou I'm not using reason-react (and reason-cli) at present. I loved experimenting with them though. If someone else ran into the same issue, I wanted them to see this. I don't know if Windows works now. Someone else might know.

@chenglou
Copy link
Member

Thanks for trying out reason-react! Yes, this did end up helping someone =)

@jordwalke
Copy link
Member

jordwalke commented Jul 26, 2017

I've verified that the latest Reason-cli dev branch works on cygwin without mingw, but have not yet tried cygwin with mingw. That is on my todo list as well. Thanks for reminding us.

Others have reported that Microsoft's new winbash works as well (but that's a whole other kind of approach to windows development).

@fhelwanger
Copy link

Are there any plans on making it work on windows without installing a unix-like environment?

@chenglou
Copy link
Member

chenglou commented Aug 1, 2017

@fhelwanger in the future, yes. We'd love to have some contribution on this!

@fhelwanger
Copy link

fhelwanger commented Aug 2, 2017

Well, I did a workaround that worked surprisingly well 😁

I installed ocaml and reason via opam on windows bash. Then, I made some batch files that simple call:

bash -c <ocaml-binary> <parameters>

With that, I got even autocomplete in vscode to work.

It's very dirty at the moment, I'll try to turn it into a script or npm package that setup all this automatically later.

The files that I used are here: https://github.com/fhelwanger/ocaml-on-windows

@chenglou
Copy link
Member

chenglou commented Aug 2, 2017

OK that's pretty crazy lol. @jordwalke would we be able to use that somewhat officially until things are cleaned up?

@fhelwanger
Copy link

I updated the repo. Now it's a npm package.

I'm really new to this ocaml and reason world, so feedback is very appreciated 😄

@fhelwanger
Copy link

fhelwanger commented Aug 3, 2017

Just tested on one machine without cygwin and the vscode-reasonml extension didn't work 😕

Already found why and opened this issue: https://github.com/freebroccolo/ocaml-language-server/issues/27

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants