cordova-cli icon indicating copy to clipboard operation
cordova-cli copied to clipboard

Cordova not properly installed or conflicting with powershell 7 core

Open Stephynoe opened this issue 5 years ago • 1 comments

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 { - | [-args ] | [<CommandParameters>] } ] [-ConfigurationName ] [-CustomPipeName ] [-EncodedCommand <Base64EncodedCommand>] [-ExecutionPolicy <ExecutionPolicy>] [-InputFormat {Text | XML}] [-Interactive] [-MTA] [-NoExit] [-NoLogo] [-NonInteractive] [-NoProfile] [-OutputFormat {Text | XML}] [-SettingsFile <filePath>] [-STA] [-Version] [-WindowStyle

   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 { - | [-args ]\r\n' + ' | [<CommandParameters>] } ]\r\n' + ' [-ConfigurationName ] [-CustomPipeName ]\r\n' + ' [-EncodedCommand <Base64EncodedCommand>]\r\n' + ' [-ExecutionPolicy <ExecutionPolicy>] [-InputFormat {Text | XML}]\r\n' + ' [-Interactive] [-MTA] [-NoExit] [-NoLogo] [-NonInteractive] [-NoProfile]\r\n' + ' [-OutputFormat {Text | XML}] [-SettingsFile <filePath>] [-STA] [-Version]\r\n' + ' [-WindowStyle

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

Stephynoe avatar Sep 12 '20 14:09 Stephynoe

This should be resolved by the dropping of the telemetry feature

dpogue avatar Jun 18 '24 07:06 dpogue