I am trying to use an Android native module in my React Native app, but I’m running into an error.
I created a new project using the React Native CLI:
npx @react-native-community/cli@latest init Chatwithpdf
Here is the repository: Chatwithpdf GitHub Repo
Now, I want to add additional functionality, such as login/signup using Appwrite . Here is my login implementation: 👉 appwrite.ts
However, when I try to run the app, I get the following error:
TypeError: Cannot read property 'NativeModule' of undefined
It seems like I’m missing some configuration related to native modules.
Steps to reproduce:
Clone the repo.
Install dependencies:
npm install --legacy-peer-deps
Start Metro:
npm start
Run the Android app:
npm run android
Question: What configuration or setup am I missing to properly use Android native modules in my React Native project?
