question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: Command failed: wmic os get Caption 'wmic' is not recognized as an internal or external command, operable program or batch file.

See original GitHub issue

Bug Report

What does actually happen?

Im getting this error after I updated to cordova 9.0.0

C:\Users\admin\AppData\Roaming\npm\node_modules\cordova\node_modules\execa\index
.js:347
                throw err;
                ^

Error: Command failed: wmic os get Caption
'wmic' is not recognized as an internal or external command,
operable program or batch file.


    at makeError (C:\Users\admin\AppData\Roaming\npm\node_modules\cordova\node_m
odules\execa\index.js:174:9)
    at Function.module.exports.sync (C:\Users\admin\AppData\Roaming\npm\node_mod
ules\cordova\node_modules\execa\index.js:338:15)
    at windowsRelease (C:\Users\admin\AppData\Roaming\npm\node_modules\cordova\n
ode_modules\windows-release\index.js:34:24)
    at osName (C:\Users\admin\AppData\Roaming\npm\node_modules\cordova\node_modu
les\os-name\index.js:39:18)
    at new Insight (C:\Users\admin\AppData\Roaming\npm\node_modules\cordova\node
_modules\insight\lib\index.js:37:13)
    at Object.<anonymous> (C:\Users\admin\AppData\Roaming\npm\node_modules\cordo
va\src\telemetry.js:26:15)
    at Module._compile (internal/modules/cjs/loader.js:701:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
    at Module.load (internal/modules/cjs/loader.js:600:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)

Information

Command or Code

cordova -v cordova help cordova build android

Version information

Cordova 9.0.0 Window 7 64x

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

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:31 (5 by maintainers)

github_iconTop GitHub Comments

50reactions
MaryemZOBIcommented, May 10, 2019

thanks @janpio, adding “c:\Windows\System32\wbem” to my path environnement variable solved this problem

6reactions
janpiocommented, May 9, 2019

Related: https://github.com/sindresorhus/windows-release/issues/10

Do you have c:\Windows\System32\wbem\WMIC.exe? Then this might help: https://superuser.com/a/1434268/25933

Read more comments on GitHub >

github_iconTop Results From Across the Web

"wmic is not recognized as an internal or external command ...
Open Control Panel > System > Advanced System settings. · Click Environment variables button and select the System Variables section. · Edit Path ......
Read more >
'wmic' is not recognized as an internal or external command ...
But I get this error: 'wmic' is not recognized as an internal or external command, operable program or batch file. I ensured that...
Read more >
WMIC is not recognized as an internal or external command
The error states that the WMIC is not recognized as an internal or external command. Windows displays this error message when it does...
Read more >
'C:\wmic' is not recognized as an internal or external command ...
'C:\wmic' is not recognized as an internal or external command, operable program or batch file · 2 · What is wmic ? ·...
Read more >
FIX 'wmic' is not recognized as an internal or ... - YouTube
FIX ' wmic ' is not recognized as an internal or external command, operable program or batch file.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found