I think I may have some confusion around upgrading Angular, Angular CLI, and NGRX using an Nx workspace. To begin, aren't Angular, Angular CLI, and NGRX all dependencies of Nx? In other words, the Nx commands are only going to work with certain versions of each? If that is the case should I never upgrade any of those dependencies within my workspace (assuming the "upgrade" command does that)? I ask because I find all sorts of incompatible or missing peer dependencies when upgrading.
Yes, dependencies are a problem. I am manually changing over to the package.json file. Also, I do not understand that packages like @ngrx/schematics are still used in version 5.2.0.
I use:
├── UNMET PEER DEPENDENCY @angular-devkit/schematics@^0.6.0
├── @angular/[email protected]
├── @nrwl/[email protected]
├── UNMET PEER DEPENDENCY @schematics/angular@^0.6.0
├── [email protected]
└── [email protected]
It would be nice if there was a list of libraries (and their versions) that are associated with each Nx release. It should also be noted which ones are okay to upgrade on our own and which shouldn't. Some of the dev dependencies I have never used so those should be listed with a description of sorts. I don't like have dependencies I didn't necessary install myself for a specific reason.
If I am way off base here, any direction would be appreciated--also happy to contribute on this front if you can guide me. Appreciate all the hard work thus far!
@tommyc38 if you run the update script on your package.json, nx will update angular, cli and ngrx versions for you. You can always find the package versions that nx depends on at node_modules/@nrwl/schematics/src/lib-versions.d.ts file on your project. Alternatively, the nx-example repo's package.json history has all the changes that is related to nx update.
@offwork
Also, I do not understand that packages like @ngrx/schematics are still used in version 5.2.0.
We are working on making schematics work with the latest @ngrx/schematics. You can still update your ngrx version but nx ngrx command to create new ngrx store will not work.
@Yonet thank you for the feedback. This definitely helps. I think it would be helpful and more user friendly if there was feedback when running those scripts that told you what libraries and their version are compatible with the current version of Nx. It would also be helpful to know that if you update any of those to a more recent version they will essentially break Nx. Just a thought :). Thanks again!
As I said at the beginning, dependencies are a problem. Nx is a very useful Angular productivity tool. But at least it should progression parallel to the Angular.
I've added your question here: https://github.com/nrwl/nx-examples#faq
I think this is the link for FAQs now: https://github.com/nrwl/nx/wiki/FAQ