ruwan liyanage
ruwan liyanage

Reputation: 451

There is an error while installing "npm i angularfire2"

I'm working with angular project. I want to take AngularFireStorage by an import of this sort of import { AngularFireStorage } from 'angularfire2/storage'; For this I tried for it by this command npm i angularfire2 But there was an error. I saw an article in a tutorial that describe as this. "AngularFire has moved, we're now @angular/fire" What is the meaning of this? Is it intent that npm i angularfire2 is not working or something? However How I use import { AngularFireStorage } from 'angularfire2/storage'; for attain AngularFireStorage to my project?

Upvotes: 1

Views: 1263

Answers (2)

Shubham Sali
Shubham Sali

Reputation: 482

used this command: npm install firebase angularfire2 --save and import angular.module import { AngularFirestore } from 'angularfire2/firestore';

Upvotes: 1

Sunil Kashyap
Sunil Kashyap

Reputation: 2984

angularfire2 is moved to @angular/fire that means they have changed the repo name.

use npm install firebase @angular/fire --save to install angularfire2 package.

and import like import { AngularFirestore } from '@angular/fire/firestore';

while importing just replace angularfire2 to @angular/fire

for more information - Link

Upvotes: 5

Related Questions