nx: nx migrate errors in yarn with any arguments

Current Behavior

Running nx migrate with no arguments, latest, 12.10.0, etc., all result in Error: Command failed: yarn.

Expected Behavior

I expect migrate to initiate an update, I believe this is how I upgraded to nx 12.9.0.

Steps to Reproduce

nx migrate

Unfortunately, this is happening in a corporate monorepo which has been through a lot. I’ll be active to respond to any requests for more information.

Failure Logs

root ➜ /workspaces/react (feature/DEV-2057-upgrade-nextjs-12-try-2) $ nx migrate latest
/workspaces/react/node_modules/@nrwl/workspace/node_modules/yargs/build/lib/yargs.js:1132
                throw err;
                ^

Error: Command failed: yarn
    at checkExecSyncError (node:child_process:707:11)
    at Object.execSync (node:child_process:744:15)
    at taoPath (/workspaces/react/node_modules/@nrwl/workspace/src/command-line/nx-commands.js:340:21)
    at Object.handler (/workspaces/react/node_modules/@nrwl/workspace/src/command-line/nx-commands.js:96:19)
    at Object.runCommand (/workspaces/react/node_modules/@nrwl/workspace/node_modules/yargs/build/lib/command.js:196:48)
    at Object.parseArgs [as _parseArgs] (/workspaces/react/node_modules/@nrwl/workspace/node_modules/yargs/build/lib/yargs.js:1043:55)
    at Object.get [as argv] (/workspaces/react/node_modules/@nrwl/workspace/node_modules/yargs/build/lib/yargs.js:986:25)
    at Object.initLocal (/workspaces/react/node_modules/@nrwl/cli/lib/init-local.js:25:79)
    at Object.<anonymous> (/workspaces/react/node_modules/@nrwl/cli/bin/nx.js:43:18)
    at Module._compile (/usr/local/share/.config/yarn/global/node_modules/v8-compile-cache/v8-compile-cache.js:192:30) {
  status: 1,
  signal: null,
  output: [ null, null, null ],
  pid: 6976,
  stdout: null,
  stderr: null
}

Environment

>  NX  Report complete - copy this into the issue template

  Node : 16.3.0
  OS   : linux x64
  yarn : 1.22.5
  
  nx : 12.9.0
  @nrwl/angular : Not Found
  @nrwl/cli : 12.9.0
  @nrwl/cypress : 12.9.0
  @nrwl/devkit : 12.9.0
  @nrwl/eslint-plugin-nx : 12.9.0
  @nrwl/express : Not Found
  @nrwl/jest : 12.9.0
  @nrwl/linter : 12.9.0
  @nrwl/nest : Not Found
  @nrwl/next : 12.9.0
  @nrwl/node : Not Found
  @nrwl/nx-cloud : Not Found
  @nrwl/react : 12.9.0
  @nrwl/schematics : Not Found
  @nrwl/tao : 12.9.0
  @nrwl/web : 12.9.0
  @nrwl/workspace : 12.9.0
  @nrwl/storybook : 12.9.0
  @nrwl/gatsby : Not Found
  typescript : 4.3.5

I’ve tried with yarn version 1.22.5 and 1.22.15.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 20 (5 by maintainers)

Most upvoted comments

Any solution to this problem?

I am also facing this problem