First, I compared my current package.json with the earlier git committed package.json, where the app was working but the below aws amplify ui library was still not installed.
@aws-amplify/ui-react-native": "^2.4.2",
Observed that the previous version was "aws-amplify": "^6.12.2" and not "^6.13.2" (as seen in latest package.json which seems to have updated after installing @aws-amplify/ui-react-native 2.4.2)
So browsed the below npm link for the aws amplify ui library and tried to install earlier versions.
https://www.npmjs.com/package/@aws-amplify/ui-react-native?activeTab=versions
When tried to install the library version which was a year old (2.1.0), it shows error "supported only till react 0.73", while my react version is "0.74". Thus started trying versions earlier than an year and which would no longer show the above error. Eventually, installed version 2.2.0 using below.
$ npm install @aws-amplify/[email protected]
On installing version 2.2.0, noticed that "aws-amplify": "^6.12.2" (as per earlier package.json where app was working)
Now restarted the node server and re-built the app.
The AWS Amplify UI component for Authentication was now loaded on the app screen, showing the login page for the app.