PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, April 13, 2022

[FIXED] How to use nx migrate latest command?

 April 13, 2022     angular, migration, node.js, nomachine-nx, npm     No comments   

Issue

I try to migrate from angular 11 to angular 12 using the nx migrate command, but I've an error I can't understand what happens and how to fix it.

Basically, when I run nx migrate latest my output is :

/Users/USERNAME/Projects/myNxAngular11Project/node_modules/yargs/build/lib/yargs.js:1132
                throw err;
                ^

Error: Command failed: npm install --legacy-peer-deps
    at checkExecSyncError (child_process.js:635:11)
    at Object.execSync (child_process.js:671:15)
    at taoPath (/Users/USERNAME/Projects/myNxAngular11Project/node_modules/@nrwl/workspace/src/command-line/nx-commands.js:312:21)
    at Object.handler (/Users/USERNAME/Projects/myNxAngular11Project/node_modules/@nrwl/workspace/src/command-line/nx-commands.js:86:19)
    at Object.runCommand (/Users/USERNAME/Projects/myNxAngular11Project/node_modules/yargs/build/lib/command.js:196:48)
    at Object.parseArgs [as _parseArgs] (/Users/USERNAME/Projects/myNxAngular11Project/node_modules/yargs/build/lib/yargs.js:1043:55)
    at Object.get [as argv] (/Users/USERNAME/Projects/myNxAngular11Project/node_modules/yargs/build/lib/yargs.js:986:25)
    at Object.initLocal (/Users/USERNAME/Projects/myNxAngular11Project/node_modules/@nrwl/cli/lib/init-local.js:24:13)
    at Object.<anonymous> (/Users/USERNAME/Projects/myNxAngular11Project/node_modules/@nrwl/cli/bin/nx.js:43:18)
    at Module._compile (/Users/USERNAME/.nvm/versions/node/v12.21.0/lib/node_modules/@nrwl/cli/node_modules/v8-compile-cache/v8-compile-cache.js:192:30) {
  status: 1,
  signal: null,
  output: [ null, null, null ],
  pid: 75743,
  stdout: null,
  stderr: null
}

I don't know why and how to fix this issue. I tryied npm 6.14.13 and 7.16.0, with node 12.21.0 only. (with rm -fr ./node_modules at each version change)

Here you can find my nx report


>  NX  Report complete - copy this into the issue template

  Node : 12.21.0
  OS   : darwin x64
  npm  : 7.16.0
  
  nx : Not Found
  @nrwl/angular : 12.0.8
  @nrwl/cli : 12.0.8
  @nrwl/cypress : 12.0.8
  @nrwl/devkit : 12.0.8
  @nrwl/eslint-plugin-nx : Not Found
  @nrwl/express : Not Found
  @nrwl/jest : 12.0.8
  @nrwl/linter : 12.0.8
  @nrwl/nest : Not Found
  @nrwl/next : Not Found
  @nrwl/node : Not Found
  @nrwl/react : Not Found
  @nrwl/schematics : Not Found
  @nrwl/tao : 12.0.8
  @nrwl/web : Not Found
  @nrwl/workspace : 12.0.8
  @nrwl/storybook : Not Found
  @nrwl/gatsby : Not Found
  typescript : 4.1.4

I don't know what to do, do you have any idea of why this crash ? which version of npm/node should I use ? maybe my nx installation is broken (when I switch npm from v6 to v7, I run npm i -g nx --force to reinstall the correct package, but not sure if this changes somethings)


Solution

Fixed in version 12.4.0 of cli released today https://github.com/nrwl/nx/releases/tag/12.4.0



Answered By - Shining
Answer Checked By - Marilyn (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing