I have verified on my windows that I have Powershell - the latest version installed.
When I run the command from the Playwright website :
pwsh bin/Debug/netX/playwright.ps1 install
I get the following error : 'argument bin/Debug/netX/playwright.ps1' is not recognized as the name of a script file. and I have been unable to find a work around. *
*to add more the error
There is an existing GitHub issue regarding this problem. To summarize the solutions listed there, here are a few things you can try:
Install the PowerShell tool:
dotnet tool install --global PowerShell
Or, Update the PowerShell tool:
dotnet tool update --global PowerShell
Or, Install PowerShell Core from the Microsoft website
Then, you can try to install playwright CLI and the browsers.
dotnet tool install --global Microsoft.Playwright.CLI
playwright install
If none if these solves your problem, kindly share in the comments.
Related
I have C++ project with its target platform version type as 10.0.15063.0 and target platform as Windows 10.
I tried to create a azure pipeline that builds and publishes the artifacts, but I am facing issue to install windows sdk of specific version using choco(i.e 10.0.15063.x).
command tried :
choco install windows-sdk-10.0 --version=10.0.15063
I am getting error saying the package not found in the sources listed. Is there any way to fix the issue.
The version 10.0.15063.0 is not in the choco package list. As an alternative, you can download the installation from link, and install it via command.
Download bash command:
curl -LO "https://download.microsoft.com/download/E/1/B/E1B0E6C0-2FA2-4A1B-B322-714A5586BE63/windowssdk/winsdksetup.exe"
chmod 777 winsdksetup.exe # add permission for execution
Install in powershell silently:
Start-Process winsdksetup.exe -ArgumentList "/q" -Wait
Verify the version on my local machine:
However, the version number is strange, it shows 10.1.15063 actually in control panel.
So I can install it with choco command instead:
choco install windows-sdk-10.1 --version=10.1.15063.468 -y
Please check the version in regedit and control panel.
Doesn't look like that version is available. You can confirm this by searching for the package and listing all versions using choco list or choco search (search and list are synonyms for choco.exe):
choco list -a windows-sdk-10.0
Today, only one version is available: 10.0.26624. You can try to get the attention of the package maintainer on the package listing via the comments or Contact Maintainers link in the sidebar to update it or you can build your own and host on an internal feed for your use case.
There is something that does not make sense in choco package microsoft-build-tools version 15.0.26228.0 in combination with Docker on Windows Server 2016:
Using following Dockerfile:
# Adopted from http://blog.alexellis.io/3-steps-to-msbuild-with-docker/
FROM microsoft/dotnet-framework:4.6.2
SHELL ["powershell"]
# Install Chocolatey
RUN Set-ExecutionPolicy Bypass
RUN iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
# Install dotnet 4.6.2
RUN choco install netfx-4.6.2-devpack -y
# Install MSBuild 15.0
RUN choco install microsoft-build-tools -y
CMD ["powershell"]
The logs, both docker and choco indicate success, but inside the container ./Program Files (x86)/Microsoft Visual Studio/2017 folder has not been created and msbuild.exe has not be extracted.
If, inside the container, I reinstall the microsoft-build-tools using choco: the folder is created and image is ready to build .net 4.6.2 code.
Any ideas/thoughts?
I have ended up installing the build tool on the workstation and adding it to the image using copy command (not sure it is allowed to distribute msbuild):
https://github.com/vkhazin/dotnet462-build/blob/master/Dockerfile
I ran into the same issue today. I didn't have any problems with my last project which required dotnet 3.5. This led me to my workaround.
When I based my new image on dotnet-framework:3.5 microsoft-build-tools install fine. If I use dotnet-framework:4.6.2 or dotnet-framework:4.7 nothing shows up.
When I use this command in command mode:
D:\xampp\htdocs\profileApp>npm run dev
I get this error:
'npm' is not recognized as an internal or external command, operable
program or batch file.
How can I solve this?
First of all, I assume you are a Windows user. In this case, you need to download and install NPM together with NodeJS from the official website. When installing, do not unselect the "Add to PATH variables" point. It's important that NPM is added to your PATH variables, so it's globally available.
After installing, simply restart your terminal(s)
Download and install Gitbash it will be used to run such commands. `
Git bash will help you emulate bash commands. Read this article with how to use git and npm on windows with Git Bash
First you need to install Node which comes with NPM bundled in so that it would be recognizable by Windows CMD you can download the latest version from the Official Website.
Optional : If you are willing to work on open source projects consider
installing Git for windows
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
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
Load watchman archive by this instruction https://facebook.github.io/watchman/docs/install#binary-downloads-for-linux-macos-and-windows-beta
Create folder watchman in c:\Users\USERNAME\AppData\Local
Extract watchman archive to watchman folder. You must get c:\Users\USERNAME\AppData\Local\watchman\watchman.exe
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
Set add to enviroment path c:\Users\USERNAME\AppData\Local\watchman
Re login in you system or reboot PC
Open terminal and run command watchman -v and you must see version
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)
Go to https://github.com/facebook/watchman/actions?query=is%3Asuccess+event%3Apush+branch%3Amaster
Click on the CI label (the first CI label you can see)
2.1 Press on the first item you see. In the example is: "Updating submodules Summary: Github commits...
2.2 Choose "Windows"
3.Look in the top right of the resulting page for the Artifacts drop down
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.
Go to C:\Users\YOUR_USERNAME\AppData\Local\
Create a folder called "watchman"
Copy there the files you've extracted (the most important one is watchman.exe)
So in your watchman folder, you'll have
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.
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
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.
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'))
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
I am trying to get to grips with node.js, this looked like a fun tut http://net.tutsplus.com/tutorials/javascript-ajax/how-to-scrape-web-pages-with-node-js-and-jquery/ but I have only got the native windows version of node.js and I can't find a way to install any packages.
I have also looked at installing the binaries using chocalatey, but my version of vista doesn't have access to powershell. However, I do have a machine running windows 7 that I can switch to. If it isn't possible to install packages on windows version, I will switch to that machine and work through chocalatey.
Assuming you have the node.exe for Windows, npm has experimental support for windows. You can try working through the README.
Otherwise you can manually install packages on Windows. You will need to manually look at the package.json files for dependencies if you are going with option 2.
I have never tried it, but Scott Hanselman also has a post about getting node running on Windows.
Personally I have found its easier to just run a Linux VM since Windows support is kinda spotty right now.
The short answer is if you have git properly installed, you can open a cmd window, navigate to the directory containing node.exe, and run this:
git config --system http.sslcainfo /bin/curl-ca-bundle.crt
git clone --recursive git://github.com/isaacs/npm.git
cd npm
node cli.js install npm -gf
The more complete answer is that I posted a guide on how to install Node on Windows here. It also describes installing npm to manage packages. Let me know if it works for you.