Cordova not properly installed or conflicting with powershell 7 core
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] <filePath> [args]]
[-Command { - |
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] <filePath> [args]]\r\n' +
' [-Command { - |
Command or Code
cordova --version or cordova -v
Environment, Platform, Device
Microsoft Windows [Version 10.0.10240]
Version information
+-- @angular/[email protected] +-- [email protected] +-- [email protected] +-- [email protected] `-- [email protected] javac 14.0.2
Checklist
- [x] I searched for existing GitHub issues
- [x] I updated all Cordova tooling to most recent version
- [x] I included all the necessary information above
This should be resolved by the dropping of the telemetry feature