Playwright giving "npm ERR! could not determine executable to run" failure

Viewed 34

Just started playing with Playwright. Installed and decided to run the tests that come with it. Can't figure out why it is failing.

$ npx playright tests                                                                                                                                            
[11:09:04]
npm ERR! could not determine executable to run
FAIL

I've double check Typescript installed

$ tsc -v   
Version 4.7.4

and nom

$ npm -v                                                                                                                                                   
8.1.0

I looked up solution on this site, and it mentions removing the .git/hooks file - I don't have that.

package.json is straight forward:

{
  "name": "project01",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {},
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "@playwright/test": "^1.25.2"
  }
}

What on earth am I missing? Did a lot of Googling and still stuck. Any help would be appreciated.

1 Answers

So, I'm not sure what happened, but when I tried a phone new project and followed the same steps, everything worked fine.

I guess the take away is, if this happens, try re-installing ¯_(ツ)_/¯

Related