0

I was following a tutorial to learn NEST JS and NEST CLI is installed successfully, but on creating a project via command nest new project-name it creates a directory with name undefined and then ask for the package manager. After selecting the package manager it gives below error

Which package manager would you ❤️  to use? npm
▹▹▹▹▹ Installation in progress... ☕events.js:187
      throw er; // Unhandled 'error' event
      ^

Error: spawn C:\Windows\system32\cmd.exe ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
    at onErrorNT (internal/child_process.js:456:16)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)
Emitted 'error' event on ChildProcess instance at:
    at Process.ChildProcess._handle.onexit (internal/child_process.js:270:12)
    at onErrorNT (internal/child_process.js:456:16)
    at processTicksAndRejections (internal/process/task_queues.js:80:21) {
  errno: 'ENOENT',
  code: 'ENOENT',
  syscall: 'spawn C:\\Windows\\system32\\cmd.exe',
  path: 'C:\\Windows\\system32\\cmd.exe',
  spawnargs: [ '/d', '/s', '/c', '"npm install --silent"' ]
}

I have gone through the valuable comments on the following post Why npm start is throwing events.js:187 throw er; // Unhandled 'error' event in my react project? but my problem isn't solved.

Node Version - v12.13.0

NPM Version - v6.13.6

NEST CLI Version - v6.14.1

Looking forward to the answers.

Thanks.

Manoj Sethi
  • 1,898
  • 8
  • 26
  • 56

1 Answers1

0

Well, the NestJS team has resolved the issue. They suggest updating the CLI to latest. Below is the reference link to the same.

https://github.com/nestjs/nest-cli/issues/544

Manoj Sethi
  • 1,898
  • 8
  • 26
  • 56