Skip to content

Instantly share code, notes, and snippets.

@oviava
Last active April 21, 2017 12:50
Show Gist options
  • Save oviava/9c7f0a5ec2fdcdc737b0a75239e6546f to your computer and use it in GitHub Desktop.
Save oviava/9c7f0a5ec2fdcdc737b0a75239e6546f to your computer and use it in GitHub Desktop.

Setting up Nuclide with flow on Windows

Download and install OCAML build tools

Download and install version 4.01 for windows: http://www.ocamlpro.com/pub/ocpwin/ocpwin-builds/ocpwin64/20160113/ocpwin64-20160113-4.01.0+ocp1-full-mingw64.exe

Pull the latest flow repo and build the binary

# pull the latest version of flow - working with 0.27
git clone https://github.com/facebook/flow
# build flow
cd flow
make
# copy the built executable to your node path
# for me it is c:\Users\<my_user>\AppData\Roaming\npm\
cp bin/flow.exe <_NODE_PATH_>

Download watchman for windows

Available here: http://bit.ly/watchmanwinalpha, you can find the link here if you have trust issues: facebook/watchman#19

Copy watchman.exe to your node path, usually c:\Users\<my_user>\AppData\Roaming\npm\

Make nuclide work with flow

which doesn't seem to work on Windows, but you can use where:

Go to your atom packages folder, for me it was: c:\Users\<my_user>\.atom\packages\nuclide\pkg\nuclide-flow-base\lib\

Edit FlowHelpers.js:

// in `canFindFlow`
// replace
...('which', [flowPath]);
// with
...('where', [flowPath]);

!!!!!!

In System Environment Variables change Path to PATH .. case seems to matter.

Path Conffig

@DonaldMackay
Copy link

Latest Flow has fixed FlowHelper.js with a windows conditional. So this step is no longer needed.

@stevekennaird
Copy link

Confirmed that changing Path to PATH makes the difference (for Win 10, within System > Advanced System Settings > Environment Variables... > System Variables > Edit "Path" > 'Edit text...' button) - Flow wouldn't work within Nuclide for me without this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment