简体   繁体   中英

Why module not found error occur in react?

I try to connect firebase data base to react app but it give error module not found

import firebase from "firebase/app"
import "firebase/auth";
 const app = firebase.initializeApp({
    apiKey: ,
    authDomain: ,
    projectId: ,
    storageBucket: ,
    messagingSenderId: ,
    appId: 
 })
 export const auth = app.auth()
 export default app

This is a picture of error在此处输入图像描述

Kindly check if firebase exists in your package.json file dependencies

If not found you can run:

npm i @firebase/app

If found you can reinstall the package

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM