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?
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?
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
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
watchman
in c:\Users\USERNAME\AppData\Local
c:\Users\USERNAME\AppData\Local\watchman\watchman.exe
settings: Edit the system environment variables -> Environment variables
System -> System Info -> Advance system settings -> Advance (tab) -> Environment variables
c:\Users\USERNAME\AppData\Local\watchman
watchman -v
and you must see version.rar
file, I can share it. –
Ecclesiastic 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)
2.1 Press on the first item you see. In the example is: "Updating submodules Summary: Github commits...
3.Look in the top right of the resulting page for the Artifacts drop down
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.
So in your watchman folder, you'll have
Now We'll create an environment variable so you can access watchman from anywhere. here is where setx comes in.
Copy and paste the following command (replace your username!)
setx path "%path%;C:\Users\YOUR_USERNAME\AppData\Local\watchman"
If everything is ok, you'll se a success message
Restart your computer
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
Win
+R
) and type in Rundll32 sysdm.cpl,EditEnvironmentVariables
–
Ecumenicism 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
After a while I found the latest zip is here:
https://github.com/facebook/watchman/actions?query=is%3Asuccess+event%3Apush+branch%3Amaster
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.
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
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.
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'))
C:/Users/USERNAME/AppData/Local/watchman
C:/Users/USERNAME/AppData/Local/watchman/watchman.exe
setx path "%path%;C:\Users\USERNAME\AppData\Local\watchman"
$ENV:PATH
watchman -v
© 2022 - 2024 — McMap. All rights reserved.