How to install Watchman on Windows (win10)?
Asked Answered
T

10

40

I am trying to install Watchman to my computer for npm for React Native. I opened the docs http://facebook.github.io/watchman/docs/install.html and can't understand how it should be done.

Could you please explain me more detailed?

Tinhorn answered 19/7, 2016 at 7:12 Comment(0)
U
28

For those using Chocolatey (this is not published on the website yet, but found the info in the github repo):

Watchman is available to install via the Chocolatey Windows package manager. Installation is as simple as:

PS C:\> choco install watchman

Reference: https://github.com/facebook/watchman/blob/573b18b86b88759f31e83fa2e1837539d138de22/website/_docs/install.markdown#installing-on-windows-via-chocolatey

Beware that installing Chocolatey itself is somewhat tedious, but here is the link if you'd like to give it a go: https://chocolatey.org/courses/installation

Upsweep answered 4/12, 2020 at 15:17 Comment(0)
B
21
  1. Load watchman archive by this instruction https://facebook.github.io/watchman/docs/install#binary-downloads-for-linux-macos-and-windows-beta
  2. Create folder watchman in c:\Users\USERNAME\AppData\Local
  3. Extract watchman archive to watchman folder. You must get c:\Users\USERNAME\AppData\Local\watchman\watchman.exe
  4. Open path environment in
    • click on luppa (find) and insert settings: Edit the system environment variables -> Environment variables
    • OR System -> System Info -> Advance system settings -> Advance (tab) -> Environment variables
  5. Set add to enviroment path c:\Users\USERNAME\AppData\Local\watchman
  6. Re login in you system or reboot PC
  7. Open terminal and run command watchman -v and you must see version
Bahner answered 23/3, 2019 at 10:12 Comment(3)
the URL you are mentioning, when navigating shows "Page Not Found".Rubyeruch
I literally couldn't find a working zip file anywhere. Every Window zip I found had errors at runtime. Eventually I ended up digging up an old version that I already had on my machine. If anyone knows a good place to upload a 3.5mb .rar file, I can share it.Ecclesiastic
Note: "If the Windows build is not available in the latest release, please check previous releases. We have a weekly auto release system." - from github. In case you're facing the same problem as me and can only see the source code.Kendrickkendricks
J
12

Here is the official guide to download Watchman on Windows.

Anyway I would post here not only how to download watchman but also the correct installation of it (the first steps I will copy from the official guide)

  1. Go to https://github.com/facebook/watchman/actions?query=is%3Asuccess+event%3Apush+branch%3Amaster

  2. Click on the CI label (the first CI label you can see) enter image description here

2.1 Press on the first item you see. In the example is: "Updating submodules Summary: Github commits... enter image description here

2.2 Choose "Windows" enter image description here

3.Look in the top right of the resulting page for the Artifacts drop down enter image description here

  1. Click it to reveal the download artifacts link

5.Click that and extract the zip file

Now it comes the most important part that the official guide does not explain:

After

Extract the zip file and make sure that watchman.exe is located in a directory that is in your PATH.

  1. Go to C:\Users\YOUR_USERNAME\AppData\Local\
  2. Create a folder called "watchman"
  3. Copy there the files you've extracted (the most important one is watchman.exe)

So in your watchman folder, you'll have enter image description here

  1. Open Windows PowerShell as Administrator (If you don't have administrator privileges you can see the edit answer)

Now We'll create an environment variable so you can access watchman from anywhere. here is where setx comes in.

  1. Copy and paste the following command (replace your username!)

    setx path "%path%;C:\Users\YOUR_USERNAME\AppData\Local\watchman"

  2. If everything is ok, you'll se a success message

  3. Restart your computer

  4. After restarting you can open again Windows PowerShell and run the following command:

    watchman -v

If you can see the version, you've been installed watchman correctly


EDIT Thanks @airstrike for your suggestion in the comments

You can run dialog (press Win+R) and type in

Rundll32 sysdm.cpl,EditEnvironmentVariables

Then create your user environment seeting the following path: C:\Users\YOUR_USERNAME\AppData\Local\watchman

Continue with the Step 7

Jack answered 9/4, 2020 at 21:37 Comment(6)
You don't need to be an administrator to change your PATH variable. Just open the Run dialog (press Win+R) and type in Rundll32 sysdm.cpl,EditEnvironmentVariablesEcumenicism
@Ecumenicism steps I gave won't work if you didn't open as an administrator. Did you tried at least? You can make your own answer with your solution.Jack
The steps you gave are not ideal because they impose the unnecessary constraint of needing admin rights. My comment provides any future who may not have admin rights in the machine they are using with a workaround for the limitation in your answer.Ecumenicism
You are totally right. Thanks for the comment. I've just updated the answer with your improvementJack
I see CI, but do not see "Artifacts" under it.Pitterpatter
Thanks, but in addition I found that I had to be SIGNED IN to GitHub (might seem obvious, but I hope this helps another user).Pitterpatter
I
3

You have to install Linux Bash Shell on Windows 10

After that run the following command on Bash

apt-get install python-dev libtool m4 automake pkg-config
git clone https://github.com/facebook/watchman.git
cd watchman/
git checkout v4.9.0
./autogen.sh
./configure
make
sudo make install
Irruptive answered 12/6, 2018 at 17:0 Comment(1)
As previously sad, you dont HAVE to, but you couldMetaplasm
H
1

After a while I found the latest zip is here:

https://github.com/facebook/watchman/actions?query=is%3Asuccess+event%3Apush+branch%3Amaster

Hereditary answered 11/2, 2020 at 9:58 Comment(0)
N
1

The latest version of watchman didn't have the watchman.exe file in it. So please use https://github.com/facebook/watchman/releases/tag/v2021.01.11.00 to download watchman and follow the instructions in @Andrey Patseiko's answer.

Numen answered 5/9, 2021 at 18:10 Comment(1)
Thank you a lot, I downloaded few latest versions and couldn't find the exe file.Filibeg
C
1

You would have to run Powershell in administrator mode and then run the following commands:

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

Then close the PowerShell terminal and reopen it in administrator more again and run this command:

choco install watchman
Champac answered 6/2, 2023 at 5:43 Comment(0)
M
0

Watchman on Windows is currently in an alpha state. The link from the installation page links to this issue; the instructions are in the top post: https://github.com/facebook/watchman/issues/19

If you are not comfortable following those instructions, then using Watchman is not yet for you.

Mordent answered 19/7, 2016 at 23:48 Comment(0)
B
0

You can install watchman on windows 10 with command below.

choco install watchman

You need to have choco installed already. Unless, you should install choco with command below.

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
Boil answered 18/11, 2021 at 18:59 Comment(1)
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Traumatize
L
0
  1. Download watchman.exe, or install Watchman using this link here
  2. Create a folder C:/Users/USERNAME/AppData/Local/watchman
  3. Copy the watchman.exe to the above folder: C:/Users/USERNAME/AppData/Local/watchman/watchman.exe
  4. Open PowerShell as Administrator
  5. Add directory to PATH env variable by using setx path "%path%;C:\Users\USERNAME\AppData\Local\watchman"
  6. Reopen PowerShell as Administrator, and you can check that it was added: $ENV:PATH
  7. And that watchman is found: watchman -v
Lumpfish answered 30/6, 2023 at 2:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.