Can i update my monorepo nx workspace without upgrading angular version? - monorepo

Want to move from nx 10 workspace to 12 without moving away from angular 10.
nx migrate latest however upgrade also upgrade angular by default.
I searched https://nx.dev/previous/angular/core-concepts/updating-nx.
Nothing specific mentioned here.
Can someone please let me know if it is possible and if yes then could you provide the steps.

Yes, you can update your nx monorepo without upgrading Angular with the next command:
nx migrate latest --to="#nrwl/angular#13.10.6"
Change 13.10.6 with the current version of that package. The side-effect is you can't use the Schematics this package provides.
Restore typescript package to the lastest version compatible with you Angular version

You can use:
nx migrate #nrwl/workspace --to="angular/whatever#10.0.0,angular/other#10.0.0"

Related

Using ThreeJS with React v16

I am trying to render 3D files in my react project. I am using ThreeJS for my react project of version 16.13.1. After installing #react-three/fiber & #react-three/drei these packages, I am getting error of Module not found: Can't resolve 'react-dom/client'. After searching solution for this I get to know that for these we have to upgrade React version to 17 or above. I did it in demo project & it worked. But the restriction is that I can not update actual project version from 16 to 18 as it will change or break so many things as well as I have to take care of other dependencies. Is there any solution available for using ThreeJS with React v16.
Or if there is any other way or different packages available to render 3D files (like .glb, .gltf) please share with me.
Thank you in advance.
How to find a version of a library that supports particular version of react?
Google <library-name> npm
Go to npm page
Go to repository (usually github)
Open package.json
Check version of react; if it's matching your version go to 7.
Change tag to some previous version; go to 5.
#react-three/fiber & #react-three/drei for react 16.13.1
These two should work:
#react-three/fiber 4.2.21
#react-three/drei 3.2.0
npm install #react-three/fiber#4.2.21 #react-three/drei#3.2.0
Disclaimer
You can never know if the packages work without trying. Many things changes and bug fixes only apply to the newest versions.
I found one package react-3d-viewer to render 3D files which perfectly work for me.
Google model viewer also works and it comes with variety of props which is good for customization of rendered 3D model.
https://github.com/dwqdaiwenqi/react-3d-viewer
https://modelviewer.dev/docs/index.html

Several problems after Angular v11 to v12 upgrade

When I upgraded my Angular app from 11 to 12, I encountered the following issues:
The development section of file angular.json disappeared
Visual Studio Code breakpoints would no longer be hit
Production warning from ng serve
How can I fix this?
Here is what happened: the Angular website has an upgrade helper that assists developers with determining the given upgrade steps for their combination of versions and libraries. It's missing a step. It’s rather simple what happened:
Visual Studio Code is unable to debug with breakpoints, because the upgrade forced my app into a production-only configuration. The upgrade scripts removed my development section from my angular.json file.
Run the following to complete the missed step:
ng update #angular/cli --migrate-only --from=11.2.0

expo-ads-admob not updating as expected

As I'm sure many are aware, admob needed an update to use a newer SDK (7.64+) and this message appears on your admob account if you have apps using an SDK below that version:
Some of your iOS apps require a GMA SDK update To keep ads serving normally and minimize a loss in ad revenue, implement the GMA SDK 7.64.0 (or later) for your iOS apps. And configure the SKAdNetwork in your apps with Google's network ID.
Expo had a PR here that was merged 6 days ago. This should have updated the GMA SDK to 7.69.0. However, when I ran expo upgrade it states that it updated expo-ads-admob,
✅ The following packages were updated:
expo-ads-admob, expo-av, expo-keep-awake, expo-updates, react-native, react, react-dom, #babel/core, react-native-web, babel-preset-expo, expo
but no changes actually take effect. And if I have the newer version (10.0.0) that I manually installed as stated below, it downgrades it to 8.4.0.
When that wasn't working, I then went and manually updated expo-ads-admob to 10.0.0 via npm (also tried yarn) and it looked like the node package was actually updated (checking the CHANGELOG and it has info about 10.0.0).
Still when I build my app with expo build:ios, run the new app, and check my GMA SDK version on admob it is still using 7.55.1.
I have also tried completely removing expo-ads-admob and reinstalling, but the same issue occurs.
Any ideas as to why this is occurring? Is there some other method I should be using to upgrade to the latest commit on expo's master branch?
Appreciate all the assistance in advance and let me know if there is any additional info I can provide.
Additional Info:
SDK Version: 40.0.0
Platform: iOS
Workflow: Managed
EDIT: Received answer from Expo member, see answer below.
You cannot use updated packages if using the managed workflow, it must be bare workflow in order to update module versions manually. Therefore, this admob update won't take place for managed workflows until expo SDK 41 is released.
See expo forum here for more.

How to downgrade react native version while creating project, not after

previously we were using react native ver 0.59.0 and somehow it's upgraded to ver 0.60.3. As we know that their many major changes in this version, so now with the latest versions we are facing many issues in the development. So are there any ways to downgrade it to ver 0.59.0 again.
So please suggest us anyway to do the same.
Thanks in advance.
You can specify which React Native version to use when creating the project through the CLI by passing the version flag:
react-native init newproject --version react-native#0.59.0

How to I update my React version in the ASP.NET Core React/Redux template project?

I've started learning React with Redux and part of my development has seen me want to use the Material UI to make my application more interesting. I created my project in Visual Studio 2017 using the React with Redux template for ASP.NET Core.
I followed the documentation presented at the MatrialUI site and opted to use the CDN option for delivery of the MaterialUI library.
I started creating a few elements and was quickly confronted with the message that I needed to upgrade my react installation to use the Toolbar.
My question is, when we use the Visual Studio React/Redux ASP.NET Core template, how do I update my react installation? Is that carried out via NPM? I can't see any nuget packages relating to React.
Many thanks
Hey not sure if you found an answer yet but here is my take:
I tried using npm update inside the "ClientApp" folder, but that didn't seem to work. Something that did work though was manually updating each package. So open up a separate terminal -> cd into the ClientApp directory and then
npm i <package name>#<newest version>
so an example would be
npm i react#16.8.6
Some packages you will definitely need to update are React, React-DOM and rimraf. But you might choose to just update all of them while you're at it. When you're using ASP.NET Core try and go for the 2.2 version, which at least already has Bootstrap 4 installed.
Another tip: With Visual Studio, if you hover over the package names in the package.json file inside, it will show you the latest version. That's gonna make it a bit easier to find out what version you want to update to.
Hope that helped! And if anyone has a better solution please let me know.

Resources