简体   繁体   English

使用angularfire2 v4时出错

[英]the error with using angularfire2 v4

I'm trying to build something with new angularfire2 version, but having trouble after trouble. 我正在尝试使用新的angularfire2版本构建一些东西,但遇到麻烦后遇到麻烦。 Now I'm stuck at the following error: Failed to compile. 现在我遇到了以下错误:编译失败。

./~/firebase/app/shared_promise.js
Module not found: Error: Can't resolve 'promise-polyfill' in 'my 
directory.../node_modules/firebase/app'
@ ./~/firebase/app/shared_promise.js 37:35-62
@ ./~/firebase/app/firebase_app.js
@ ./~/firebase/app.js
@ ./~/firebase/database.js
@ ./~/angularfire2/database/firebase_list_factory.js
@ ./~/angularfire2/database.js
@ ./src/app/app.module.ts
@ ./src/main.ts
@ multi webpack-dev-server/client?http://localhost:4200 ./src/main.ts

what is wrong? 怎么了?

I fixed it by going in my package.json file and changing the firebase dependency to ^3.6.6. 我通过进入我的package.json文件并将firebase依赖项更改为^ 3.6.6来修复它。 After doing that, save the file and run npm install again. 完成后,保存文件并再次运行npm install。 Hope it helps. 希望能帮助到你。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM