node_modules/firebase/index"' has no exported member 'functions'.

错误信息:

D:\project\eyeshot\eyeshot\Source3>ionic cordova run android
> ionic-app-scripts build --target cordova --platform android
[07:23:31]  ionic-app-scripts 3.2.0
[07:23:31]  build dev started ...
[07:23:31]  clean started ...
[07:23:31]  clean finished in 5 ms
[07:23:31]  copy started ...
[07:23:32]  deeplinks started ...
[07:23:32]  deeplinks finished in 320 ms
[07:23:32]  transpile started ...
[07:23:37]  typescript: ...ject/eyeshot/eyeshot/Source3/node_modules/@angular/fire/firebase.app.module.d.ts, line: 2
            Module '"D:/project/eyeshot/eyeshot/Source3/node_modules/firebase/index"' has no exported member
            'functions'.

       L1:  import { InjectionToken } from '@angular/core';
       L2:  import { app, auth, database, firestore, functions, messaging, storage } from 'firebase/app';
       L3:  export declare type FirebaseOptions = {

[07:23:37]  ionic-app-script task: "build"
[07:23:37]  Error: Failed to transpile program
Error: Failed to transpile program
    at new BuildError (D:\project\eyeshot\eyeshot\Source3\node_modules\@ionic\app-scripts\dist\util\errors.js:16:28)
    at D:\project\eyeshot\eyeshot\Source3\node_modules\@ionic\app-scripts\dist\transpile.js:159:20
    at new Promise (<anonymous>)
    at transpileWorker (D:\project\eyeshot\eyeshot\Source3\node_modules\@ionic\app-scripts\dist\transpile.js:107:12)
    at Object.transpile (D:\project\eyeshot\eyeshot\Source3\node_modules\@ionic\app-scripts\dist\transpile.js:64:12)
    at D:\project\eyeshot\eyeshot\Source3\node_modules\@ionic\app-scripts\dist\build.js:109:82

......

解决办法:

修改package.json文件,

把"firebase": "^4.6.1",改为"firebase": "^5.0.0"

猜你喜欢

转载自blog.csdn.net/daqiang012/article/details/84054628