首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >错误: polifill promise angularfire2

错误: polifill promise angularfire2
EN

Stack Overflow用户
提问于 2017-08-25 07:51:39
回答 2查看 235关注 0票数 0

我被angular fire-2离线/ionic3应用程序卡住了。当我尝试将我的应用程序上传到ionic view时,它一直给我这个错误。当我为Android构建或使用ionic lab时,它都没有错误。

我发现其他人也有多层填充的问题,他们建议这样做:

代码语言:javascript
复制
npm install promise-polyfill --save-exact

但它对我不起作用,错误仍然存在。以下是我的版本(package.json):

"firebase":"^4.3.0","angularfire2":"^4.0.0-rc0","angularfire2-offline":"^4.2.4",

代码语言:javascript
复制
     Error: ./node_modules/firebase/utils/promise.js Module not found: Error: Can't resolve 'promise-polyfill' in
remote:             '/usr/src/app/node_modules/firebase/utils' resolve 'promise-polyfill' in
remote:             '/usr/src/app/node_modules/firebase/utils' Parsed request is a module using description file:
remote:             /usr/src/app/node_modules/firebase/package.json (relative path: ./utils) Field 'browser' doesn't contain a
remote:             valid alias configuration after using description file: /usr/src/app/node_modules/firebase/package.json
remote:             (relative path: ./utils) resolve as module looking for modules in /usr/src/app/node_modules using
remote:             description file: /usr/src/app/package.json (relative path: ./node_modules) Field 'browser' doesn't contain
remote:             a valid alias configuration after using description file: /usr/src/app/package.json (relative path:
remote:             ./node_modules) using description file: /usr/src/app/package.json (relative path:
remote:             ./node_modules/promise-polyfill) no extension Field 'browser' doesn't contain a valid alias configuration
remote:             /usr/src/app/node_modules/promise-polyfill doesn't exist .ts Field 'browser' doesn't contain a valid alias
remote:             configuration /usr/src/app/node_modules/promise-polyfill.ts doesn't exist .js Field 'browser' doesn't
remote:             contain a valid alias configuration /usr/src/app/node_modules/promise-polyfill.js doesn't exist .json Field
remote:             'browser' doesn't contain a valid alias configuration /usr/src/app/node_modules/promise-polyfill.json
remote:             doesn't exist as directory /usr/src/app/node_modules/promise-polyfill doesn't exist
remote:             [/usr/src/app/node_modules/promise-polyfill] [/usr/src/app/node_modules/promise-polyfill.ts]
remote:             [/usr/src/app/node_modules/promise-polyfill.js] [/usr/src/app/node_modules/promise-polyfill.json]
remote:             [/usr/src/app/node_modules/promise-polyfill] @ ./node_modules/firebase/utils/promise.js 14:76-103 @
remote:             ./node_modules/firebase/app/firebase_app.js @ ./node_modules/firebase/app.js @
remote:             ./node_modules/firebase/firebase-browser.js @ ./src/providers/camera/camera.ts @ ./src/app/app.module.ts @
remote:             ./src/app/main.ts
EN

回答 2

Stack Overflow用户

发布于 2017-09-20 10:51:55

npm安装angularfire2 firebase promise-polyfill --保存

angularfire2更新了他们的文档。

https://github.com/angular/angularfire2/blob/master/docs/Auth-with-Ionic3-Angular4.md

票数 1
EN

Stack Overflow用户

发布于 2017-08-26 22:39:33

在将angularfire2安装到我的应用程序后,我遇到了完全相同的错误;只有在将代码推送到ionic pro平台时才会出现同样的错误。首先,我也有为ios构建的错误,通过将angularfire2更新到另一个版本而逃脱了这个错误:

代码语言:javascript
复制
npm i --save angularfire2@4.0.0-rc.1

也许你可以试一试?

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/45872509

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档