1

I am new to angular and firestore database I first started working with Realtime Database but now I want to work with firestore so I wasn't able to find the imports of angular firestore so I run this command

ng add @angular/fire

npm install --save firebase @angular/fire

Also deleted package-lock.json

and re run the command like

npm-i

and also npm-update

tried to find the various solutions to remove the below error but didn't get success

The error is below which I get when I run the command ng serve

This likely means that the library (@angular/fire/firestore) which declares AngularFirestore has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.

also got this one

ERROR in node_modules/@angular/fire/firestore/firestore.d.ts:85:22 - error NG6002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class.

Let me know if anyone has a better solution.

For the better understanding please head to this post

couldnt import fireStoreModule correctly in angular

kushal Baldev
  • 729
  • 1
  • 14
  • 37
  • please post your package.json – Kisinga Aug 05 '20 at 18:21
  • Actually if you can, create a stackblitz project with all the relevant code, as this might be a deeply linked issue – Kisinga Aug 05 '20 at 18:23
  • Stackblitz gives button for adjusting imports where I particulary see the problem is somwhere related to imports which vs code couldnt recognize or not being properly done – kushal Baldev Aug 05 '20 at 19:12

1 Answers1

-1

I'd say that you can follow the tutorial installation from a cleaner environment.

I've already tried it and I was able to deploy the welcome page pretty much smoothly. So I think you could try to run that sample and identify the relevant differences, maybe there are some versions mismatching in compatibility.

I would point out that the error posted looks more related with the way you are importing the libraries, I've found this github issue with the same error message in it seems it was related to the imports.

I've seen your package.json at the mentioned SO post and I think it looks fine, I've noticed you are using one version before the latest.

sergio franco
  • 346
  • 2
  • 10