Skip to content

ncu 18 uses Node/npm, even when installed via Bun #1515

Open
@GingerAdonis

Description

@GingerAdonis

Steps to Reproduce

  • Install Node on Linux without npm.
  • Install Bun on Linux.
  • Globally install npm-check-updates via bun install -g npm-check-updates
  • Run ncu -g

Current Behavior

node:events:496
      throw er; // Unhandled 'error' event
      ^

Error: spawn npm ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:285:19)
    at onErrorNT (node:internal/child_process:483:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:90:21)
Emitted 'error' event on ChildProcess instance at:
    at ChildProcess._handle.onexit (node:internal/child_process:291:12)
    at onErrorNT (node:internal/child_process:483:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:90:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn npm',
  path: 'npm',
  spawnargs: [ '--global', '--json', 'ls', '--depth=0' ]
}

Node.js v22.14.0

Expected Behavior

ncu is executed using Bun and thus recognizes it shouldn't use npm.

Workaround

Command: ncu -g --packageManager bun

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions