Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/firebase/6.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
为什么我不能';在我导入AngularFire 2课程后,是否为我的angular 4应用程序提供服务?_Angular_Firebase_Angularfire2 - Fatal编程技术网

为什么我不能';在我导入AngularFire 2课程后,是否为我的angular 4应用程序提供服务?

为什么我不能';在我导入AngularFire 2课程后,是否为我的angular 4应用程序提供服务?,angular,firebase,angularfire2,Angular,Firebase,Angularfire2,这很可能是因为您的一个角度包已过时 我在将项目更新为Angular 5时出现了这个错误,但没有更新@Angular/cli的版本,但我认为其他过时的软件包也会引发同样的错误 以下是您的package.json的依赖项列表,如果您打算升级到Angular 5,应该可以解决此错误: ERROR in Error: Metadata version mismatch for module C:/Users/Momo/Desktop/clientpanelapp/src/app/app.module.t

这很可能是因为您的一个角度包已过时

我在将项目更新为Angular 5时出现了这个错误,但没有更新
@Angular/cli
的版本,但我认为其他过时的软件包也会引发同样的错误

以下是您的
package.json
的依赖项列表,如果您打算升级到Angular 5,应该可以解决此错误:

ERROR in Error: Metadata version mismatch for module C:/Users/Momo/Desktop/clientpanelapp/src/app/app.module.ts, found version 3, expected 4
    at StaticSymbolResolver.getModuleMetadata (C:\Users\Momo\Desktop\clientpanelapp\node_modules\@angular\compiler\bundles\compiler.umd.js:31822:34)
    at StaticSymbolResolver._createSymbolsOf (C:\Users\Momo\Desktop\clientpanelapp\node_modules\@angular\compiler\bundles\compiler.umd.js:31579:46)
    at StaticSymbolResolver.resolveSymbol (C:\Users\Momo\Desktop\clientpanelapp\node_modules\@angular\compiler\bundles\compiler.umd.js:31238:14)
    at StaticReflector.findSymbolDeclaration (C:\Users\Momo\Desktop\clientpanelapp\node_modules\@angular\compiler\bundles\compiler.umd.js:30355:67)
    at StaticReflector.findDeclaration (C:\Users\Momo\Desktop\clientpanelapp\node_modules\@angular\compiler\bundles\compiler.umd.js:30330:21)
    at Object.listLazyRoutesOfModule (C:\Users\Momo\Desktop\clientpanelapp\node_modules\@angular\compiler-cli\src\ngtools_impl.js:51:37)
    at Function.NgTools_InternalApi_NG_2.listLazyRoutes (C:\Users\Momo\Desktop\clientpanelapp\node_modules\@angular\compiler-cli\src\ngtools_api.js:91:39)
    at AotPlugin._getLazyRoutesFromNgtools (C:\Users\Momo\Desktop\clientpanelapp\node_modules\@ngtools\webpack\src\plugin.js:207:44)
    at _donePromise.Promise.resolve.then.then.then.then.then (C:\Users\Momo\Desktop\clientpanelapp\node_modules\@ngtools\webpack\src\plugin.js:443:24)
    at process._tickCallback (internal/process/next_tick.js:109:7)

有关更多信息,请参阅Github上的此选项。

如果您提供了导致此错误的一些代码,这将非常有用。请告诉我下面的答案是否有效-我在升级到Angular 5时遇到此错误。如果你发布更多关于你想要达到的目标的详细信息,以及在你犯下这个错误之前你做了什么,你愿意修改我的答案吗?
  "dependencies": {
    "@angular/animations": "5.0.0",
    "@angular/cdk": "^5.0.0-rc0",
    "@angular/common": "5.0.0",
    "@angular/compiler": "5.0.0",
    "@angular/core": "5.0.0",
    "@angular/forms": "5.0.0",
    "@angular/http": "5.0.0",
    "@angular/material": "^5.0.0-rc0",
    "@angular/platform-browser": "5.0.0",
    "@angular/platform-browser-dynamic": "5.0.0",
    "@angular/platform-server": "5.0.0",
    "@angular/router": "5.0.0",
    "core-js": "^2.5.1",
    "hammerjs": "^2.0.8",
    "rxjs": "5.5.2",
    "zone.js": "^0.8.18"
  },
  "devDependencies": {
    "@angular/cli": "^1.5.3",
    "@angular/compiler-cli": "5.0.0",
    "@types/jasmine": "2.6.0",
    "@types/node": "^8.0.34",
    "codelyzer": "^3.2.1",
    "ts-node": "~3.3.0",
    "tslint": "~5.7.0",
    "typescript": "2.4.2"
  }