我正在尝试通过运行从npm安装angularfire2,但我一直收到此错误
D:\angular\firebase\apartment>npm install angularfire2 firebase --save
apartment@0.0.0 D:\angular\firebase\apartment
+-- angularfire2@4.0.0-rc.1
`-- firebase@4.1.3
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN angularfire2@4.0.0-rc.1 requires a peer of @angular/common@^4.0.0 but none was installed.
npm WARN angularfire2@4.0.0-rc.1 requires a peer of @angular/compiler@^4.0.0 but none was installed.
npm WARN angularfire2@4.0.0-rc.1 requires a peer of @angular/core@^4.0.0 but none was installed.
npm WARN angularfire2@4.0.0-rc.1 requires a peer of @angular/platform-browser@^4.0.0 but none was installed.
npm WARN angularfire2@4.0.0-rc.1 requires a peer of @angular/platform-browser-dynamic@^4.0.0 but none was installed.
答案 0 :(得分:1)
npm警告的最后5个是由于依赖性。您没有安装angularfire所需的模块。
两种可能的解决方案是降级你的npm,即低于3。 npm< 3可以单独下载依赖模块,也可以先安装5个依赖模块。