question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Migration-Related Notes: Nx 9 -> Nx 10 -> Nx 11

See original GitHub issue

Folks, migrating workspaces is hard. Every workspace is different, with different combinations of versions, packages, package managers etc… Also, every workspace evolves differently: as you migrate from version to version, you make small changes making your workspace unique.

Please read the following to learn about the migrate command: https://nx.dev/workspace/update.

To reiterate a few things from the doc:

Important: Use Latest Version of Migration Logic

  • If you are on the latest Nx 10 or Nx 11, we will automatically use the latest version of the migration logic to update your workspace. There is nothing you need to do.

If you aren’t on the latest 10x or 11x:

  • If you are on the earlier version of Nx and you are using npm 6 (or yarn, pnpm), you have to do it yourself by running npx @nrwl/tao@latest migrate latest.
  • NPM 7 broke npx, so npx @nrwl/tao@latest migrate latest won’t work. So you have to manually update the version of @nrwl/tao in your package.json to latest (or latest 10x) and then run npx nx migrate latest.
  • If you are seeing Cannot find module '@angular-devkit/architect', you are an unlucky person who is using Nx 10.4.11. I–Victor Savkin–screwed up that patch release. I’m sorry about this. Run nx migrate 10.4.12, run npm/yarn/pnpm install, which will fix it, and then follow the instructions above.

One Major at a Time

It’s easier to migrate one major version at a time. If you want to migrate from 9x to 11x (latest), you could run:

> npx @nrwl/tao@latest migrate latest

For most workspace it will work, but for some it won’t. In this case run:

> npx @nrwl/tao@latest migrate 10.4.12 (do the whole migration process to 10x). See instructions above for npm 7 users.
> nx migrate atest (do the whole migration process to 11x)

If You Use Angular, Don’t Use Ng Update

Please read https://nx.dev/latest/core-concepts/updating-nx to see why nx migrate is a more reliable way to migrate your workspace. \

We Can Help

If you see an exception while migrating, file an issue. Troubleshooting migration-related issues tends to be challenging, but we will do our best to unblock you.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
markgohocommented, Jan 29, 2021
  • How do we know which Angular-related packages will be updated via nx migrate and which ones won’t? E.g. NgRx, RxJS, etc.
  • How do we know which version of Angular nx migrate is targeting when we run the command? E.g. version 11.1 of Angular is out, but when I run nx migrate latest I’m not getting the latest version of Angular.
  • Does that mean I wait until Nx updates to Angular 11.1?
  • What harm might I cause by manually updating to a newer version of Angular outside of nx migrate?

Also: https://nx.dev/workspace/update is redirecting to nx.dev

2reactions
x87commented, Dec 30, 2020

@vsavkin & Nrwl Just stopped by to say that you guys are great. Thank you for all your hard work on Nx tools. Let the next year be rock solid for all frontend communities that you support: Angular, React, Vue and, of course, Nx itself. Take a break, and enjoy holiday time!

Read more comments on GitHub >

github_iconTop Results From Across the Web

NX 11.0.2 Release Notes - Siemens PLM
NX 11.0. 2 is a major release with significant new functionality in all areas of the product, and we believe that these new...
Read more >
Working with Spreadsheet Data in NX - Swoosh Technologies
To assist you with migrating data between spreadsheet applications, NX provides a migration utility. Platforms. On Windows, you can migrate ...
Read more >
NX Role Migration - YouTube
This video demonstrates how to migrate roles from one NX version to another version. By the way, this is just one of the...
Read more >
Features you wish NX had? - Siemens: UG/NX - Eng-Tips
In my experience in aerospace, fabricators could make mirrored parts based on a note on a drawing specifying "-X SHOWN, -Y OPPOSITE". I...
Read more >
"Standard data not found" creating/updating Part Family
I'm having NX 11 (got upgraded from NX 9 recently) and Ansys 16.2 in my machine. ... How to start working on NxOpen...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found