Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command failed error when running yo after update to 3.1.0 on Windows #1726

Closed
patridge opened this issue Oct 23, 2019 · 1 comment
Closed

Comments

@patridge
Copy link
Contributor

patridge commented Oct 23, 2019

After updating my global install of Yeoman on Windows 10 (1903), I can no longer run the yo command successfully from any terminal I try: cmd, Windows PowerShell, or PowerShell Core.

Every time I try, I get an error about a failure from wmic os get Caption (message quoted below). This command, run on its own in a terminal, does indeed produce the Description = Unspecified error as this error message describes.

So far, the only command I can get to run successfully is yo --version, which returns 3.1.0.

Error message

> yo
C:\Users\patridge\AppData\Roaming\npm\node_modules\yo\node_modules\windows-release\node_modules\execa\index.js:347
                throw err;
                ^

Error: Command failed: wmic os get Caption
ERROR:
Description = Unspecified error


    at makeError (C:\Users\patridge\AppData\Roaming\npm\node_modules\yo\node_modules\windows-release\node_modules\execa\index.js:174:9)
    at Function.module.exports.sync (C:\Users\patridge\AppData\Roaming\npm\node_modules\yo\node_modules\windows-release\node_modules\execa\index.js:338:15)
    at windowsRelease (C:\Users\patridge\AppData\Roaming\npm\node_modules\yo\node_modules\windows-release\index.js:34:24)
    at osName (C:\Users\patridge\AppData\Roaming\npm\node_modules\yo\node_modules\os-name\index.js:39:18)
    at new Insight (C:\Users\patridge\AppData\Roaming\npm\node_modules\yo\node_modules\insight\lib\index.js:37:13)
    at Object.<anonymous> (C:\Users\patridge\AppData\Roaming\npm\node_modules\yo\lib\cli.js:54:17)
    at Module._compile (internal/modules/cjs/loader.js:956:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
    at Module.load (internal/modules/cjs/loader.js:812:32)
    at Function.Module._load (internal/modules/cjs/loader.js:724:14) {
  code: 2147500037,
  stdout: '',
  stderr: 'ERROR:\r\r\nDescription = Unspecified error\r\r\n',
  failed: true,
  signal: null,
  cmd: 'wmic os get Caption',
  timedOut: false
}

Attempts to fix

  • I tried running the wmic os get Caption command from an administrator promt to see if that was the issue, but no luck.
  • I tried restarting my terminal windows and even my entire machine after installing the update to Yeoman in case it was some PATH issue. No luck.
  • I tried updating Node.js as well (with a cautionary restart afterwards). No luck.

Potentially related items

[Edit: read the issue submission docs and added requested info]

System info

Here's the information from the issue submission command.

>yo --version && echo %PATH% %NODE_PATH% && node -e "console.log(process.platform, process.versions)"
3.1.0
C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\PowerShell\6\;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Users\patridge\AppData\Local\Microsoft\WindowsApps;C:\Users\patridge\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\patridge\.dotnet\tools;C:\Users\patridge\AppData\Local\Microsoft\WindowsApps;C:\Users\patridge\AppData\Local\GitHubDesktop\bin;C:\Users\patridge\AppData\Roaming\npm %NODE_PATH%                                                           win32 {
  node: '12.13.0',
  v8: '7.7.299.13-node.12',
  uv: '1.32.0',
  zlib: '1.2.11',
  brotli: '1.0.7',
  ares: '1.15.0',
  modules: '72',
  nghttp2: '1.39.2',
  napi: '5',
  llhttp: '1.1.4',
  http_parser: '2.8.0',
  openssl: '1.1.1d',
  cldr: '35.1',
  icu: '64.2',
  tz: '2019a',
  unicode: '12.1'                                                                                                       }
@patridge
Copy link
Contributor Author

Going to move this to the correct repo. Sorry about that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant