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

Error: spawnSync C:\Windows\system32\cmd.exe ENOENT #142

Open
webmandman opened this issue Apr 26, 2021 · 2 comments
Open

Error: spawnSync C:\Windows\system32\cmd.exe ENOENT #142

webmandman opened this issue Apr 26, 2021 · 2 comments

Comments

@webmandman
Copy link

webmandman commented Apr 26, 2021

Expected Behavior

Initialize my first PANNG stack test app.

Current Behavior

When I run nxpm-stack init --name sandbox I get this error:

>  NXPM  Creating Nx Workspace
>  NXPM   RUN  yarn create nx-workspace PANNGstackTestApp --cli=nx --nx-cloud=false --preset=empty --skip-install --package-manager=yarn
>  NXPM  Install dependencies
>  NXPM   RUN  yarn add -D @nxpm/stack @nrwl/angular @nrwl/nest @nxtend/ionic-angular @nxtend/capacitor @ngneat/[email protected]
nxpm-stack.js init

Initialize new nxpm workspace

Options:
      --help             Show help                                     [boolean]
      --version          Show version number                           [boolean]
      --allowExisting                                                  [boolean]
  -n, --name                                                 [string] [required]
      --cli                                             [string] [default: "nx"]
      --webStyleLibrary                           [string] [default: "tailwind"]

<ref *1> Error: spawnSync C:\Windows\system32\cmd.exe ENOENT
    at Object.spawnSync (internal/child_process.js:1066:20)
    at spawnSync (child_process.js:602:24)
    at Object.execSync (child_process.js:647:15)
    at runCommand (C:\Development\Tools\nvm\v14.11.0\node_modules\@nxpm\cli\src\lib\commands\workspace-init.js:15:21)
    at Object.<anonymous> (C:\Development\Tools\nvm\v14.11.0\node_modules\@nxpm\cli\src\lib\commands\workspace-init.js:60:9)
    at Generator.next (<anonymous>)
    at C:\Development\Tools\nvm\v14.11.0\node_modules\@nxpm\cli\node_modules\tslib\tslib.js:117:75
    at new Promise (<anonymous>)
    at Object.__awaiter (C:\Development\Tools\nvm\v14.11.0\node_modules\@nxpm\cli\node_modules\tslib\tslib.js:113:16)
    at Object.workspaceInit (C:\Development\Tools\nvm\v14.11.0\node_modules\@nxpm\cli\src\lib\commands\workspace-init.js:38:20) {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'spawnSync C:\\Windows\\system32\\cmd.exe',
  path: 'C:\\Windows\\system32\\cmd.exe',
  spawnargs: [
    '/d',
    '/s',
    '/c',
    '"yarn add -D @nxpm/stack @nrwl/angular @nrwl/nest @nxtend/ionic-angular @nxtend/capacitor @ngneat/[email protected]"'
  ],
  error: [Circular *1],
  status: null,
  signal: null,
  output: null,
  pid: 0,
  stdout: null,
  stderr: null
}

Steps to Reproduce (for bugs)

  1. npm i -g #nxpm/cli
  2. nxpm-stack init --name sandbox

Your Environment

  • OS: Windows 10 64-bit
  • NPM version 14.11

I tried it using CMD and Cmder.
and also tried it on NPM latest 16.0.0

@beeman
Copy link
Member

beeman commented Apr 27, 2021

Hey there @webmandman - thanks for checking out nxpm-stack!

Currently, the nxpm-stack installer depends on having yarn v1.x installed. Do you have that running?

@webmandman
Copy link
Author

Hello Beeman, yes I have 1.22.10.

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

2 participants