Hello,
I am trying to build an app using Expo and firebase. But during the development, I run into issues I couldn’t resolve so I need help.
So my problem is the following.
When I run my android emulator I am getting the following error message.
› Reloading apps
Android Bundling failed 5755ms
While trying to resolve module `firebase` from file `C:\Users\mikad\OneDrive\Documenten\PersonalProjects\MobileApps\questionsApp\firebaseConfig.js`, the package `C:\Users\mikad\OneDrive\Documenten\PersonalProjects\MobileApps\questionsApp\node_modules\firebase\package.json` was successfully found. However, this package itself specifies a `main` module field that could not be resolved (`C:\Users\mikad\OneDrive\Documenten\PersonalProjects\MobileApps\questionsApp\node_modules\firebase\index`. Indeed, none of these files exist:
* C:\Users\mikad\OneDrive\Documenten\PersonalProjects\MobileApps\questionsApp\node_modules\firebase\index(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json)
* C:\Users\mikad\OneDrive\Documenten\PersonalProjects\MobileApps\questionsApp\node_modules\firebase\index\index(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json)
I have tried the follwing:
1: Build a development app
Result: Getting a diffrend error: “network request failed”
2: Updating the metro.config.js
const { getDefaultConfig } = require("@expo/metro-config");
const defaultConfig = getDefaultConfig(__dirname);
defaultConfig.resolver.assetExts.push("cjs");
module.exports = defaultConfig;
Result : nothing changed
3: Deleting node modules
Result: nothing changed
4: downgrading firebase
Result: nothing changed
Current versions:
“eas-cli”: “^0.55.1”,
“expo”: “^45.0.6”,
“firebase”: “9.6.11”,
“react-native”: “0.68.2”,
Any help is greatly appreciated because I don’t know what to do anymore.