npm ERR! Invalid name: "playwright@latest" when running "Install Playwright" from VSCode Command
See original GitHub issueI wanted to try Playwright out. Haven’t previously had it installed anywhere. Created a new folder for it in VSCode and installed the Playwright Extension v0.2.8
Opened up the command palette and ran “Test: Install Playwright” Selected all browsers and included GitHub actions too.
Terminal output showing error is as follows
C:\...\MS Playwright Testing Utility> npm init --yes playwright@latest -- --quiet --browser=chromium --browser=firefox --browser=webkit --gha
npx: installed 1 in 1.798s
Getting started with writing end-to-end tests with Playwright:
Initializing project in 'playwright@latest'
Initializing NPM project (npm init -y)…
npm ERR! Invalid name: "playwright@latest"
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\bwesl\AppData\Roaming\npm-cache\_logs\2022-08-17T03_29_03_729Z-debug.log
{ Error: Command failed: npm init -y
at checkExecSyncError (child_process.js:611:11)
at execSync (child_process.js:648:13)
at executeCommands (C:\Users\bwesl\AppData\Roaming\npm-cache\_npx\23664\node_modules\create-playwright\lib\index.js:4519:39)
at Generator.run (C:\Users\bwesl\AppData\Roaming\npm-cache\_npx\23664\node_modules\create-playwright\lib\index.js:4592:5)
at process._tickCallback (internal/process/next_tick.js:68:7)
at Function.Module.runMain (internal/modules/cjs/loader.js:745:11)
at startup (internal/bootstrap/node.js:279:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:752:3)
status: 1,
signal: null,
output: [ null, null, null ],
pid: 9228,
stdout: null,
stderr: null }
Issue Analytics
- State:
- Created a year ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
[BUG] The installation with the "Install Playwright" command ...
npm ERR ! Invalid name: "playwright@latest" when running "Install Playwright" from VSCode Command microsoft/playwright-vscode#220.
Read more >playwright - npm
Installation. Playwright has its own test runner for end-to-end tests, we call it Playwright Test. Using init command.
Read more >Installing playwright using npm gives error `command failed`
json file and try running the command again. There are two other ways you can install Playwright.
Read more >Playwright Framework: Tutorial on Getting Started
How to Install and run Playwright Test Script · Click on Sign In · Enter wrong credentials · Verify Error Message is displayed...
Read more >Testing modern web apps with Playwright and VS Code
Playwright is a framework for building end-to-end tests for modern web applications. It can help us create tests that are resilient and run...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We have a fix to make it work on NPM 6, so lets keep it open until its merged!
Thanks @BW-PA @mxschmitt