-
Notifications
You must be signed in to change notification settings - Fork 345
Description
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 <style>] [-WorkingDirectory ]
pwsh[.exe] -h | -Help | -? | /?
PowerShell Online Help https://aka.ms/powershell-docs
All parameters are case-insensitive.
at makeError (C:\Users\Stephynoe\AppData\Roaming\npm\node_modules\cordova\node_modules\windows-release\node_modules\execa\index.js:174:9)
at Function.module.exports.sync (C:\Users\Stephynoe\AppData\Roaming\npm\node_modules\cordova\node_modules\windows-release\node_modules\execa\index.js:338:15)
at windowsRelease (C:\Users\Stephynoe\AppData\Roaming\npm\node_modules\cordova\node_modules\windows-release\index.js:39:19)
at osName (C:\Users\Stephynoe\AppData\Roaming\npm\node_modules\cordova\node_modules\os-name\index.js:39:18)
at new Insight (C:\Users\Stephynoe\AppData\Roaming\npm\node_modules\cordova\node_modules\insight\lib\index.js:37:13)
at new RelentlessInsight (C:\Users\Stephynoe\AppData\Roaming\npm\node_modules\cordova\src\telemetry.js:31:1)
at Object.<anonymous> (C:\Users\Stephynoe\AppData\Roaming\npm\node_modules\cordova\src\telemetry.js:39:15)
at Module._compile (internal/modules/cjs/loader.js:1137:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
at Module.load (internal/modules/cjs/loader.js:985:32) {
code: 64,
stdout: '\r\n' +
'Usage: pwsh[.exe] [-Login] [[-File] [args]]\r\n' +
' [-Command { - | [-args ]\r\n' +
' | [] } ]\r\n' +
' [-ConfigurationName ] [-CustomPipeName ]\r\n' +
' [-EncodedCommand ]\r\n' +
' [-ExecutionPolicy ] [-InputFormat {Text | XML}]\r\n' +
' [-Interactive] [-MTA] [-NoExit] [-NoLogo] [-NonInteractive] [-NoProfile]\r\n' +
' [-OutputFormat {Text | XML}] [-SettingsFile ] [-STA] [-Version]\r\n' +
' [-WindowStyle <style>] [-WorkingDirectory ]\r\n' +
'\r\n' +
' pwsh[.exe] -h | -Help | -? | /?\r\n' +
'\r\n' +
'PowerShell Online Help https://aka.ms/powershell-docs\r\n' +
'\r\n' +
'All parameters are case-insensitive.\r\n',
stderr: "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.\r\n",
failed: true,
signal: null,
cmd: 'powershell (Get-CimInstance -ClassName Win32_OperatingSystem).caption',
timedOut: false
Command or Code
cordova --version or cordova -v
Environment, Platform, Device
Microsoft Windows [Version 10.0.10240]
Version information
+-- @angular/cli@10.0.8
+-- cordova@10.0.0
+-- ionic@5.4.16
+-- native-run@1.1.0
`-- phonegap@9.0.0
javac 14.0.2
Checklist
- I searched for existing GitHub issues
- I updated all Cordova tooling to most recent version
- I included all the necessary information above