Starting Metro Bundler
warning: Bundler cache is empty, rebuilding (this may take a minute)
The following packages should be updated for best compatibility with the installed expo version:
@react-native-async-storage/async-storage@1.21.0 - expected version: 1.23.1
Your project may not work correctly until you install the expected versions of the packages. [{
"resource": "/C:/Users/user/Desktop/projects/life/Yo/yo-vibe/src/config/firebase.ts",
"owner": "typescript",
"code": "2305",
"severity": 8,
"message": "Module '"firebase/auth"' has no exported member 'getReactNativePersistence'.",
"source": "ts",
"startLineNumber": 2,
"startColumn": 26,
"endLineNumber": 2,
"endColumn": 51
}]
I see the issue now. The getReactNativePersistence function is not directly exported from "firebase/auth" in the newer versions of Firebase. Let's fix the Firebase configuration and update the async-storage package:
Update the async-storage package
npm install @react-native-async-storage/async-storage@1.23.1 --forceIf you're still having issues with Firebase persistence, try using the simpler version
src/config/firebase.ts to src/config/firebase-with-persistence.tssrc/config/firebase-simple.ts to src/config/firebase.tsClear the cache and restart
npx expo start --clearFixed Firebase Configuration:
getReactNativePersistence to be imported from "firebase/auth/react-native"Updated AsyncStorage Version:
If you continue to have issues with Firebase authentication persistence, you can use the simpler version of the Firebase configuration that doesn't use persistence. This might be more stable for development purposes.
The key difference is:
Let me know if this resolves your issue or if you're still encountering problems!
C:\Users\user\Desktop\projects\life\Yo\yo-vibe>npm install @react-native-async-storage/async-storage@1.23.1 --force
npm warn using --force Recommended protections disabled.
npm error code EJSONPARSE
npm error path C:\Users\user\Desktop\projects\life\Yo\yo-vibe/package.json
npm error JSON.parse Unexpected non-whitespace character after JSON at position 1188 (line 41 column 1) while parsing near "... "private": true\n}\n{\n "name": "yovibe"..."
npm error JSON.parse Failed to parse JSON data.
npm error JSON.parse Note: package.json must be actual JSON, not just JavaScript.npm error A complete log of this run can be found in: C:\Users\user\AppData\Local\npm-cache_logs\2025-04-08T11_53_25_349Z-debug-0.log
C:\Users\user\Desktop\projects\life\Yo\yo-vibe> [{
"resource": "/C:/Users/user/Desktop/projects/life/Yo/yo-vibe/src/config/firebase.ts",
"owner": "typescript",
"code": "2307",
"severity": 8,
"message": "Cannot find module 'firebase/auth/react-native' or its corresponding type declarations.",
"source": "ts",
"startLineNumber": 6,
"startColumn": 43,
"endLineNumber": 6,
"endColumn": 71
},{
"resource": "/c:/Users/user/Desktop/projects/life/Yo/yo-vibe/package.json",
"owner": "generated_diagnostic_collection_name#0",
"severity": 8,
"message": "End of file expected.",
"source": "json",
"startLineNumber": 41,
"startColumn": 1,
"endLineNumber": 41,
"endColumn": 2
}]
It looks like your package.json file has become corrupted with duplicate content. Let's fix it:
[V0_FILE]json:file="package.json"
{
"name": "yovibe",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios"
},
"dependencies": {
"@react-native-async-storage/async-storage": "1.23.1",
"@react-native-community/datetimepicker": "8.2.0",
"@react-navigation/bottom-tabs": "^6.5.16",
"@react-navigation/native": "^6.1.14",
"@react-navigation/native-stack": "^6.9.22",
"@react-navigation/stack": "^6.3.25",
"expo": "~52.0.8",
"expo-image-picker": "~16.0.6",
"expo-location": "~18.0.10",
"expo-splash-screen": "~0.29.22",
"expo-status-bar": "~2.0.1",
"firebase": "^10.8.0",
"react": "18.3.1",
"react-native": "0.76.9",
"react-native-calendars": "^1.1303.0",
"react-native-gesture-handler": "~2.20.2",
"react-native-maps": "1.18.0",
"react-native-safe-area-context": "4.12.0",
"react-native-screens": "~4.4.0",
"uuid": "^9.0.1"
},
"devDependencies": {
"@babel/core": "^7.23.9",
"@types/prop-types": "^15.7.11",
"@types/react": "~18.3.12",
"@types/uuid": "^9.0.8",
"typescript": "^5.3.0"
},
"private": true
}
[V0_FILE]typescript:file="src/config/firebase.ts"
import { initializeApp } from "firebase/app"
import { getAuth } from "firebase/auth"
import { getFirestore } from "firebase/firestore"
import { getStorage } from "firebase/storage"
// Your web app's Firebase configuration
// Replace with your actual Firebase config
const firebaseConfig = {
apiKey: "YOUR_API_KEY",
authDomain: "your-app.firebaseapp.com",
projectId: "your-app",
storageBucket: "your-app.appspot.com",
messagingSenderId: "YOUR_MESSAGING_SENDER_ID",
appId: "YOUR_APP_ID",
}
// Initialize Firebase
const app = initializeApp(firebaseConfig)
const auth = getAuth(app)
const db = getFirestore(app)
const storage = getStorage(app)
// Export the Firebase services
export { auth, db, storage }Fix your package.json file
Replace your firebase.ts file
Install dependencies
npm install --forceClear the cache and restart
npx expo start --clearYour package.json file became corrupted with duplicate content. The error message shows that after the end of the first JSON object ("private": true}), there was another JSON object starting ({"name": "yovibe"). This is invalid JSON syntax.
I've provided a clean version of the package.json file and a simplified firebase.ts file that doesn't try to use the React Native persistence, which was causing issues.
For now, I've removed the persistence functionality to get your app working. This means users will need to log in again if they close and reopen the app. Once your app is running correctly, we can look into adding persistence back in a way that's compatible with your setup.
Let me know if this resolves your issues!
(NOBRIDGE) ERROR Error: URL.protocol is not implemented
(NOBRIDGE) ERROR Invariant Violation: "main" has not been registered. This can
happen if:
AppRegistry.registerComponent wasn't called.You can send messages while the preview loads