nx migrate latest fail
See original GitHub issueCurrent Behavior
When I run nx migrate latest
I get:
Fetching meta data about packages.
It may take a few minutes.
Fetching @nrwl/workspace@latest
ERROR The migrate command failed. Try the following to migrate your workspace:
> npm install --save-dev @nrwl/workspace@latest
> nx migrate @nrwl/workspace@latest --from="@nrwl/workspace@10.3.3"
This will use the newest version of the migrate functionality, which might have your issue resolved.
----------------------------------------------------------------------------------------------------
Command failed: npm install @nrwl/workspace@latest --prefix=/var/folders/ll/667l8bks4wx2yg04_zs6q01h0000gn/T/tmp-82966TUw3UDqZ61RW
npm ERR! Cannot read property 'spec' of undefined
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/macio/.npm/_logs/2021-07-01T12_37_00_936Z-debug.log
/Users/macio/Projects/smartfm-workspace/smartfm/node_modules/@nrwl/workspace/node_modules/yargs/build/lib/yargs.js:1132
throw err;
^
Error: Command failed: npx tao migrate latest
at checkExecSyncError (node:child_process:707:11)
at Object.execSync (node:child_process:744:15)
at Object.handler (/Users/macio/Projects/smartfm-workspace/smartfm/node_modules/@nrwl/workspace/src/command-line/nx-commands.js:74:21)
at Object.runCommand (/Users/macio/Projects/smartfm-workspace/smartfm/node_modules/@nrwl/workspace/node_modules/yargs/build/lib/command.js:196:48)
at Object.parseArgs [as _parseArgs] (/Users/macio/Projects/smartfm-workspace/smartfm/node_modules/@nrwl/workspace/node_modules/yargs/build/lib/yargs.js:1043:55)
at Object.get [as argv] (/Users/macio/Projects/smartfm-workspace/smartfm/node_modules/@nrwl/workspace/node_modules/yargs/build/lib/yargs.js:986:25)
at Object.initLocal (/Users/macio/Projects/smartfm-workspace/smartfm/node_modules/@nrwl/cli/lib/init-local.js:24:13)
at Object.<anonymous> (/Users/macio/Projects/smartfm-workspace/smartfm/node_modules/@nrwl/cli/bin/nx.js:12:18)
at Module._compile (node:internal/modules/cjs/loader:1109:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10) {
status: 1,
signal: null,
output: [ null, null, null ],
pid: 82965,
stdout: null,
stderr: null
}
Expected Behavior
I expect no error happen when running command. not a regression
Steps to Reproduce
run nx migrate latest
This issue may not be prioritized if details are not provided to help us reproduce the issue.
Failure Logs
https://gist.github.com/memee/b95701573fa2c71ad4b55245b2456a60
Environment
nx report
> NX Report complete - copy this into the issue template
nx : Not Found
@nrwl/angular : 10.3.3
@nrwl/cli : 10.3.0
@nrwl/cypress : 10.3.3
@nrwl/eslint-plugin-nx : Not Found
@nrwl/express : Not Found
@nrwl/jest : 10.3.3
@nrwl/linter : 10.3.3
@nrwl/nest : 10.3.3
@nrwl/next : Not Found
@nrwl/node : 10.3.3
@nrwl/react : Not Found
@nrwl/schematics : Not Found
@nrwl/tao : 10.3.0
@nrwl/web : Not Found
@nrwl/workspace : 10.3.3
typescript : 4.0.3
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:9 (1 by maintainers)
Top Results From Across the Web
On nx 14.0.3 -- nx migrate latest fails · Issue #10144 · nrwl/nx
Current Behavior $ yarn nx migrate latest yarn run v1.22.17 [shortened]/node_modules/.bin/nx migrate latest ERROR The migrate command failed ...
Read more >How to use nx migrate latest command? - Stack Overflow
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...
Read more >Automate Updating Dependencies - Nx
Automate Updating Dependencies. The Nx CLI provides the migrate command to help you stay up to date with the latest version of Nx....
Read more >Nx v14 is out — Here is all you need to know!
Turns out the latest Nx v14 release is considerably faster than Nx v13: ... more migration scenarios in the future but it also...
Read more >nx cannot read properties of undefined (reading 'endswith')
NX Failed to run update-ngcc-postinstall from @nrwl/angular. ... This should cover migrating existing MFEs to the latest, using ESM and optmized production ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@pete-mcwilliams I think you have a different issue which will be fixed with: https://github.com/nrwl/nx/pull/6252
@memee Please try the suggestion as @mandarini pointed out 😄
Similar with update from 12.4 to 12.5.1
Running migration add-target-dependencies Cannot read property ‘default’ of undefined
Error: Command failed: /var/folders/2g/x5mf23357m38y6ll4070kftw0000gn/T/tmp-6950-zym2sJ5LjHnH/node_modules/.bin/tao migrate --run-migrations