Windows上的TestCafe失败,并生成powershell.exe ENOENT错误



我正在尝试在 Windows10 上运行 TestCafe 以进行评估,但在按照说明安装后 https://devexpress.github.io/testcafe/documentation/using-testcafe/installing-testcafe.html#local-installation 我总是在使用浏览器作为选项运行 testcafe 时出现以下错误,即除testcafe -htestcafe -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_MACHINESoftwareClientsStartMenuInternet*shellopencommand'|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:UsersxxxAppDataRoamingnpmnode_modulestestcafenode_modulescross-spawnlibenoent.js:6:26)
at verifyENOENT (C:UsersxxxAppDataRoamingnpmnode_modulestestcafenode_modulescross-spawnlibenoent.js:40:16)
at ChildProcess.cp.emit (C:UsersxxxAppDataRoamingnpmnode_modulestestcafenode_modulescross-spawnlibenoent.js:27:25)
at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)

操作系统版本: 视窗 10.0.18363

节点版本:v13.6.0(64位(,但我也尝试了各种其他版本和32位

npm 版本:6.13.6

测试咖啡版本:1.7.1

我使用的其他节点应用程序都没有任何问题,只有这个。如果有人可以帮助我找到问题以及如何解决它,那就太好了。

此问题已在 https://github.com/DevExpress/testcafe-browser-tools/commit/7e8baac47ec4279e896290668e68b4ff87734a83 提交中修复。 此修复包含在testcafe@1.8.0版本中。

最新更新