簡體   English   中英

Windows 上的 TestCafe 因 spawn powershell.exe ENOENT 錯誤而失敗

[英]TestCafe on Windows fails with spawn powershell.exe ENOENT error

我正在嘗試在 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_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)

操作系統版本:Windows 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版本中。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM