Skip to content

Unable to use nx migrate ** cli command #32713

@nielslindeboom

Description

@nielslindeboom

Current Behavior

Im facing an issue when i use the cli command nx migrate latest
I used nvm to manage my node runtimes

Expected Behavior

Able to run the cli command

GitHub Repo

No response

Steps to Reproduce

Install a clean workspace using npx create-nx-workspace@latest or version specific

Once installed

I attempt to run nx migrate latest i get a spawn npm ENOENT error

Nx Report

Node           : 22.19.0
OS             : win32-x64
Native Target  : x86_64-windows
npm            : 10.9.3

nx                     : 21.5.2
@nx/js                 : 21.5.2
@nx/eslint             : 21.5.2
@nx/workspace          : 21.5.2
@nx/angular            : 21.5.2
@nx/devkit             : 21.5.2
@nx/eslint-plugin      : 21.5.2
@nx/module-federation  : 21.5.2
@nx/rspack             : 21.5.2
@nx/web                : 21.5.2
@nx/webpack            : 21.5.2
typescript             : 5.9.2
---------------------------------------
Community plugins:
angular-eslint : 20.2.0
---------------------------------------
Cache Usage: 0.00 B / 95.16 GB

Failure Logs

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) {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'spawn npm',
  path: 'npm',
  spawnargs: [ 'view', 'nx@latest', '--json', '--silent' ],
  cmd: 'npm view nx@latest --json --silent',
  stdout: '',
  stderr: ''
}

Package Manager Version

No response

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions