我被我的角火2离线/离子3应用程序困住了。当我尝试将我的应用程序上传到离子视图时,它一直给我这个错误。当我为Android构建时,当我使用离子实验室时,它没有错误。
我看到其他人有一个polyfill问题他们建议做:
npm install promise-polyfill --save-exact
但它对我不起作用,错误仍然存在。这些是我的版本(package.json):
" firebase":" ^ 4.3.0", " angularfire2":" ^ 4.0.0-rc0", " angularfire2-offline":" ^ 4.2.4",
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
答案 0 :(得分:1)
npm install angularfire2 firebase promise-polyfill --save
angularfire2已更新了他们的文档。
https://github.com/angular/angularfire2/blob/master/docs/Auth-with-Ionic3-Angular4.md
答案 1 :(得分:0)
将angularfire2安装到我的应用程序后,我有完全相同的错误;只有在将代码推送到离子pro平台时。 首先,我也为ios构建了错误,通过将angularfire2更新为另一个版本来逃脱:
npm i --save angularfire2@4.0.0-rc.1
也许你可以尝试一下?