Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/three.js/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular 6,Firebase 3.9.0-全局未在node_modules/Firebase/auth.js中定义_Angular_Firebase_Angularfire2_Angular6 - Fatal编程技术网

Angular 6,Firebase 3.9.0-全局未在node_modules/Firebase/auth.js中定义

Angular 6,Firebase 3.9.0-全局未在node_modules/Firebase/auth.js中定义,angular,firebase,angularfire2,angular6,Angular,Firebase,Angularfire2,Angular6,因此,我正在使用AngularFire2构建一个带有Angular 6的web应用程序,当我加载我的应用程序时,我得到以下错误: auth.js:255 Uncaught ReferenceError: global is not defined at Object../node_modules/firebase/auth.js (auth.js:255) at __webpack_require__ (bootstrap:81) at Object../node_mod

因此,我正在使用AngularFire2构建一个带有Angular 6的web应用程序,当我加载我的应用程序时,我得到以下错误:

auth.js:255 Uncaught ReferenceError: global is not defined
    at Object../node_modules/firebase/auth.js (auth.js:255)
    at __webpack_require__ (bootstrap:81)
    at Object../node_modules/firebase/firebase-browser.js (firebase-browser.js:11)
    at __webpack_require__ (bootstrap:81)
    at Object../src/app/core/auth.service.ts (auth.guard.ts:18)
    at __webpack_require__ (bootstrap:81)
    at Object../src/app/app.component.ts (main.js:156)
    at __webpack_require__ (bootstrap:81)
    at Object../src/app/app.module.ts (app.component.ts:9)
    at __webpack_require__ (bootstrap:81)
./node_modules/firebase/auth.js @ auth.js:255
__webpack_require__ @ bootstrap:81
./node_modules/firebase/firebase-browser.js @ firebase-browser.js:11
__webpack_require__ @ bootstrap:81
./src/app/core/auth.service.ts @ auth.guard.ts:18
__webpack_require__ @ bootstrap:81
./src/app/app.component.ts @ main.js:156
__webpack_require__ @ bootstrap:81
./src/app/app.module.ts @ app.component.ts:9
__webpack_require__ @ bootstrap:81
./src/main.ts @ environment.ts:15
__webpack_require__ @ bootstrap:81
0 @ main.ts:14
__webpack_require__ @ bootstrap:81
checkDeferredModules @ bootstrap:43
webpackJsonpCallback @ bootstrap:30
(anonymous) @ main.js:1
我不确定它是否与angular版本有关,但我有一个ionic应用程序,使用angular 4的这两个库,运行良好

以下是相关软件包:

  "@angular/animations": "^6.0.1",
    "@angular/common": "^6.0.1",
    "@angular/compiler": "^6.0.1",
    "@angular/core": "^6.0.1",
    "@angular/forms": "^6.0.1",
    "@angular/http": "^6.0.1",
    "@angular/platform-browser": "^6.0.1",
    "@angular/platform-browser-dynamic": "^6.0.1",
    "@angular/platform-server": "^6.0.1",
    "@angular/pwa": "^0.6.1",
    "@angular/router": "^6.0.1",
    "@angular/service-worker": "^6.0.1",
    "@nguniversal/module-map-ngfactory-loader": "^6.0.0",
    "angularfire2": "^4.0.0-rc.1",
    "core-js": "^2.5.4",
    "firebase": "^3.9.0"

我正在使用的AngularFire和Firebase版本是否有遗漏?

作为临时黑客,请转到pollyfill.ts文件(您可以在应用程序的src文件夹中找到它)并粘贴
(如有)。global=window
在文件末尾。

如果今天有人没有告诉你他们爱你,请检查此项……让那个人就是我吧。非常感谢你解决了我的问题!最终解