Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to install playwright on a Windows due to not recognizing argument

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

like image 248
new_be_Jeff Avatar asked Jul 14 '26 00:07

new_be_Jeff


2 Answers

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.

like image 76
Md. Abu Taher Avatar answered Jul 16 '26 15:07

Md. Abu Taher


I have the same issue then i fixed it by changing the command to pwsh bin/Debug/net7.0/playwright.ps1 install

pwsh is the powershell bin/Debug/net7.0/playwright.ps1 is the file path of that PowerShell script

like image 34
chengxuyuan9527 Avatar answered Jul 16 '26 14:07

chengxuyuan9527