我被angular fire-2离线/ionic3应用程序卡住了。当我尝试将我的应用程序上传到ionic view时,它一直给我这个错误。当我为Android构建或使用ionic lab时,它都没有错误。
我发现其他人也有多层填充的问题,他们建议这样做:
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发布于 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
发布于 2017-08-26 22:39:33
在将angularfire2安装到我的应用程序后,我遇到了完全相同的错误;只有在将代码推送到ionic pro平台时才会出现同样的错误。首先,我也有为ios构建的错误,通过将angularfire2更新到另一个版本而逃脱了这个错误:
npm i --save angularfire2@4.0.0-rc.1也许你可以试一试?
https://stackoverflow.com/questions/45872509
复制相似问题