apache / cordova-cli

Apache Cordova CLI
Apache License 2.0
930 stars 338 forks source link

Cordova not properly installed or conflicting with powershell 7 core #545

Open Stephynoe opened 3 years ago

Stephynoe commented 3 years ago

Bug Report

Cordova not properly installed or conflicting with powershell 7

Problem

Can't use cordova on my windows 10 PC

What is expected to happen?

After installing cordova via command prompt, I haven't been able to create a project or even test the version with cordova

What does actually happen?

The code below is always generate

Information

C:\Users\Stephynoe\AppData\Roaming\npm\node_modules\cordova\node_modules\windows-release\node_modules\execa\index.js:347 throw err; ^

Error: Command failed: powershell (Get-CimInstance -ClassName Win32_OperatingSystem).caption The argument '(Get-CimInstance -ClassName Win32_OperatingSystem).caption' is not recognized as the name of a script file. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

Usage: pwsh[.exe] [-Login] [[-File] [args]] [-Command { - | [-args ] | [] } ] [-ConfigurationName ] [-CustomPipeName ] [-EncodedCommand ] [-ExecutionPolicy ] [-InputFormat {Text | XML}] [-Interactive] [-MTA] [-NoExit] [-NoLogo] [-NonInteractive] [-NoProfile] [-OutputFormat {Text | XML}] [-SettingsFile ] [-STA] [-Version] [-WindowStyle