jeudi 16 janvier 2020

TestCafe on Windows fails with spawn powershell.exe ENOENT error

I am trying to run TestCafe on Windows10 for evaluation purposes, but after the installation as per instructions https://devexpress.github.io/testcafe/documentation/using-testcafe/installing-testcafe.html#local-installation I am always getting the error below when running testcafe with an option that is using a browser as an option, i.e. anything except testcafe -h and testcafe -v.

ERROR Error: Command failed with ENOENT: powershell.exe -NoLogo -NonInteractive -Command "$cp = (chcp | Select-String '\\d+').Matches.Value; Try { chcp 65001; Get-Item 'Registry::HKEY_LOCAL_MACHINE\Software\Clients\StartMenuInternet\*\shell\open\command'|Get-ItemProperty -Name '(default)'|Format-List -Property '(default)','PSPath'|Out-String -Width 2147483647|Write-Host; } Finally { chcp $cp; }"
spawn powershell.exe ENOENT
    at notFoundError (C:\Users\xxx\AppData\Roaming\npm\node_modules\testcafe\node_modules\cross-spawn\lib\enoent.js:6:26)
    at verifyENOENT (C:\Users\xxx\AppData\Roaming\npm\node_modules\testcafe\node_modules\cross-spawn\lib\enoent.js:40:16)
    at ChildProcess.cp.emit (C:\Users\xxx\AppData\Roaming\npm\node_modules\testcafe\node_modules\cross-spawn\lib\enoent.js:27:25)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)

OS version: Windows 10.0.18363

Node version: v13.6.0 (64bit), but I also tried various other versions and 32bit

npm version: 6.13.6

testcafe version: 1.7.1

None of the other node apps I use is having any issues, just this one. It would be great if somebody can help me find the issue and how to fix it.

Aucun commentaire:

Enregistrer un commentaire