Npm-check-updates: --doctor does not work: Error: spawn npm ENOENT

Created on 7 Sep 2020  ·  2Comments  ·  Source: raineorshine/npm-check-updates

  • [x] I have searched for similar issues
  • [x] I am using the latest version of npm-check-updates
  • [x] I am using node >= 10.17

Steps to Reproduce

npm install -g npm-check-updates
ncu  --doctor -u

Current Behavior

❯ ncu  --doctor -u
npm install
C:\Users\aminy\AppData\Roaming\npm\node_modules\npm-check-updates\lib\npm-check-updates.js:348
  throw err
  ^

Error: spawn npm ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:268:19)
    at onErrorNT (internal/child_process.js:468:16)
    at processTicksAndRejections (internal/process/task_queues.js:80:21) {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'spawn npm',
  path: 'npm',
  spawnargs: [ 'install' ]
}

While ncu -u works perfectly fine.

Expected Behavior

Working.

bug

All 2 comments

Thanks for reporting! spawn was not being configured properly for Windows.

Will you try v8.1.1?

Thank you! It is solved now.

❯ ncu --doctor -u
npm install
npm run test
ncu -u
npm install
npm run test
✓ Tests pass

Was this page helpful?
0 / 5 - 0 ratings