当前位置:网站首页>cordova installation error Command failed: powershell solution

cordova installation error Command failed: powershell solution

2022-08-10 19:57:00 xzlAwin

cordova installation error Command failed: powershell solution

Exception information

F:\sdk\nodejs\X64\npm\node_global\node_modules\cordova\node_modules\windows-release\node_modules\execa\index.js:347throw err;^Error: Command failed: powershell (Get-CimInstance -ClassName Win32_OperatingSystem).caption

Problem description

  • After installing cordova globally, running cordova -v prompts a script error

Analyze why

  • Lack of Wbem, cordova relies on Wbem to judge the system environment

Workaround

  • Modify the Path environment variable and add the Wbem environment variable
variable namevariable value
Path append.;%SystemRoot%;
%SystemRoot%\system32;
%SystemRoot%\System32\Wbem;
原网站

版权声明
本文为[xzlAwin]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/222/202208101902485459.html