[ERROR] An error occurred while running subprocess cordova.
- Dominant language
- JavaScript
- Stars
- 967
- Forks
- 344
- Avg merge
- 8h 41m
- Merged PRs (30d)
- 9
Description
Bonjour, voilà environ 2 semaines je ne trouve pas de solution à mon problème j'ai besoin d'aide svp
C:\Users\LENOVO\ProjetIonic>ionic cordova platform add android
> cordova.cmd platform add android
C:\Users\LENOVO\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
ou externe, un programme ex�cutable ou un fichier de commandes.
at makeError (C:\Users\LENOVO\AppData\Roaming\npm\node_modules\cordova\node_modules\windows-release\node_modules\execa\index.js:174:9)
at Function.module.exports.sync (C:\Users\LENOVO\AppData\Roaming\npm\node_modules\cordova\node_modules\windows-release\node_modules\execa\index.js:338:15)
at windowsRelease (C:\Users\LENOVO\AppData\Roaming\npm\node_modules\cordova\node_modules\windows-release\index.js:39:19)
at osName (C:\Users\LENOVO\AppData\Roaming\npm\node_modules\cordova\node_modules\os-name\index.js:39:18)
at new Insight (C:\Users\LENOVO\AppData\Roaming\npm\node_modules\cordova\node_modules\insight\lib\index.js:37:13)
at new RelentlessInsight (C:\Users\LENOVO\AppData\Roaming\npm\node_modules\cordova\src\telemetry.js:31:1)
at Object. (C:\Users\LENOVO\AppData\Roaming\npm\node_modules\cordova\src\telemetry.js:39:15)
at Module._compile (node:internal/modules/cjs/loader:1092:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1121:10)
at Module.load (node:internal/modules/cjs/loader:972:32) {


code: 1,
stdout: '',
stderr: "'powershell' n'est pas reconnu en tant que commande interne\r\n" +
'ou externe, un programme ex�cutable ou un fichier de commandes.\r\n',
failed: true,
signal: null,
cmd: 'powershell (Get-CimInstance -ClassName Win32_OperatingSystem).caption',
timedOut: false
}
[ERROR] An error occurred while running subprocess cordova.
cordova.cmd platform add android exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
Contributor guide
Research direction
Start by tracing the reported command through cordova/src/telemetry.js, insight/lib/index.js, os-name/index.js, and windows-release/index.js. Reproduce `ionic cordova platform add android` on the reported Windows setup and determine the expected behavior when the `powershell` subprocess is unavailable; done means the failure is handled or diagnosed with a verified test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, powershell
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100