2017-08-24 55 views
0

我卡在我的角射擊-2離線/ ionic3應用程序。當我嘗試將我的應用上傳到離子視圖時,它一直給我這個錯誤。當我爲Android構建或使用離子實驗室時,它沒有任何錯誤。錯誤:polifill promise angularfire2

我看到其他人有填充工具的問題,他們建議做:

npm install promise-polyfill --save-exact 

,但它不爲我工作,錯誤仍然存​​在。這些都是我的版本(的package.json):

「火力點」: 「^ 4.3.0」, 「angularfire2」: 「^ 4.0.0-RC0」, 「angularfire2脫機」:「^ 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

安裝angularfire2到我的應用程序後,我有完全相同的錯誤;只有在將代碼推送到離子平臺的時候。 首先我對IOS的錯誤建設,以及,通過更新angularfire2到另一個版本逃走了:

npm i --save [email protected] 

也許你可以試試嗎?