4

I'm getting this error but I don't know why. It is vue app, I npm installed Firebase, then I created my firebaseConfig.js where is my api key and other data as in docs.. then I have my firebaseInit.js with this code:

import firebase from 'firebase'
import 'firebase/firestore'
import firebaseConfig from './firebaseConfig'

const firebaseApp = firebase.initializeApp(firebaseConfig)

export default firebaseApp.firestore()

in my package json I have this dependency:

 "firebase": "^9.6.4",

and this is what I get as an error:

This dependency was not found:

* firebase in ./src/components/firebaseInit.js

To install it, you can run: npm install --save firebase
Wytrzymały Wiktor
  • 11,492
  • 5
  • 29
  • 37
blackrox
  • 221
  • 1
  • 4
  • 10

1 Answers1

0

The issue should be resolved by reinstalling the dependency, in case it's not installed properly:

try to uninstall it first and then reinstall with npm install --save firebase.

Also, have a look at this thread - the same problem was fixed by removing the ^ sign, i. e. replace "firebase": "^9.6.4" with "firebase": "9.6.4".

Farid Shumbar
  • 1,360
  • 3
  • 10