-
Notifications
You must be signed in to change notification settings - Fork 5.4k
[Bug]: Test: Playwright Install in VSCode command Generated wrong command. #40076
Copy link
Copy link
Open
Description
Version
1.41.1
Steps to reproduce
- Open VSCode.
- Install Playwright extensions from VSCode.
- Create New Project
- Crtl + P to open VSCode command
- Type "Test: Playwright Install"
- Select: "Chorium, Firefox, and Github."
- Press Enter
Expected behavior
The command will run the npm script and install Playwright successfully.
Actual behavior
An error occurred stating
_(My Project path)_ "npm init playwright@latest --yes "--" . '--quiet' '--browser=chromium' '--browser=firefox' '--browser=webkit' '--gha'
> npx
> create-playwright . '--quiet' '--browser=chromium' '--browser=firefox' '--browser=webkit' '--gha'
error: too many arguments. Expected 1 argument but got 6.
npm error code 1
npm error path _(My Project path)_
Microsoft Windows [Version 10.0.26200.8037]"
Additional context
The corrected command should be:
npm init playwright@latest --yes "--" --quiet --browser chromium firefox webkit --gha
The issue was with the --browser option syntax. Instead of using --browser=chromium --browser=firefox --browser=webkit, you need to use --browser chromium firefox webkit (without the = and as a single option with multiple values).
Environment
npx envinfo --preset playwrightReactions are currently unavailable