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)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.