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.1 on Windows #1748

Open
kshitijzutshi opened this issue Feb 21, 2021 · 2 comments
Open

Comments

@kshitijzutshi
Copy link

After npm install -g yo generator-code, I try yo code but I get this error, I am just unable to resolve.

Error Message


PS K:\Projects\vscode-extentions> yo code
C:\nvm\v14.15.1\node_modules\yo\node_modules\execa\index.js:347
                throw err;
                ^

Error: Command failed: powershell (Get-CimInstance -ClassName Win32_OperatingSystem).caption
'powershell' is not recognized as an internal or external command,
operable program or batch file.


    at makeError (C:\nvm\v14.15.1\node_modules\yo\node_modules\execa\index.js:174:9)
    at Function.module.exports.sync (C:\nvm\v14.15.1\node_modules\yo\node_modules\execa\index.js:338:15)
    at windowsRelease (C:\nvm\v14.15.1\node_modules\yo\node_modules\windows-release\index.js:39:19)
    at osName (C:\nvm\v14.15.1\node_modules\yo\node_modules\os-name\index.js:39:18)
    at new Insight (C:\nvm\v14.15.1\node_modules\yo\node_modules\insight\lib\in    at Object.<anonymous> (C:\nvm\v14.15.1\node_modules\yo\lib\cli.js:54:17)   
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14) {
  code: 1,
  stdout: '',
  stderr: "'powershell' is not recognized as an internal or external command,\r\n" +
    'operable program or batch file.\r\n',
  failed: true,
  signal: null,
  cmd: 'powershell (Get-CimInstance -ClassName Win32_OperatingSystem).caption',  timedOut: false
}

System info

PS K:\Projects\vscode-extentions> node -e "console.log(process.platform, process.versions)"                         
win32 {
  node: '14.15.1',
  v8: '8.4.371.19-node.17',
  uv: '1.40.0',
  zlib: '1.2.11',
  brotli: '1.0.9',
  ares: '1.16.1',
  modules: '83',
  nghttp2: '1.41.0',
  napi: '7',
  llhttp: '2.1.3',
  openssl: '1.1.1g',
  cldr: '37.0',
  icu: '67.1',
  tz: '2020a',
  unicode: '13.0'
}
@qeityx
Copy link

qeityx commented Apr 20, 2022

same problem did any one found a solution

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

3 participants