错误:
Uncaught ReferenceError: global is not defined
at Object../node_modules/firebase/auth.js (auth.js:295)
at __webpack_require__ (bootstrap:79)
at Module../node_modules/angularfire2/auth/auth.js (auth.js:1)
at __webpack_require__ (bootstrap:79)
at Module../node_modules/angularfire2/auth.js (auth.js:1)
at __webpack_require__ (bootstrap:79)
at Module../src/app/app.module.ts (app.component.ts:8)
at __webpack_require__ (bootstrap:79)
at Module../src/main.ts (environment.ts:26)
at __webpack_require__ (bootstrap:79)
答案 0 :(得分:0)
似乎您的angularfire版本对于您的angular版本已经过时了,因为angular 8中,angular fire包含在angular内部:
要安装它,您可以使用:
npm install firebase @angular/fire --save
有关更多信息,请查看https://www.positronx.io/firebase-authentication-in-angular-8-with-angularfire2/-那里有很好的解释。