arnesson / cordova-plugin-firebase

Cordova plugin for Google Firebase
http://arnesson.github.io/cordova-plugin-firebase
MIT License
1k stars 1.55k forks source link

npm run build fails #1121

Open KishoreKoushik opened 4 years ago

KishoreKoushik commented 4 years ago

I was doing RnD for push notifications. When I do npm run build I am getting below errors

[12:36:30] typescript: node_modules/firebase/index.d.ts, line: 4369 ';' expected.

L4368:  gtagName?: string;
L4369:  /** Sets custom name for `dataLayer` array used by gtag. */
L4370:  dataLayerName?: string;

[12:36:30] typescript: node_modules/firebase/index.d.ts, line: 4369 'EventNameString' only refers to a type, but is being used as a value here.

L4368:  gtagName?: string;
L4369:  /** Sets custom name for `dataLayer` array used by gtag. */
L4370:  dataLayerName?: string;

[12:36:30] typescript: node_modules/firebase/index.d.ts, line: 4369 'never' only refers to a type, but is being used as a value here.

L4368:  gtagName?: string;
L4369:  /** Sets custom name for `dataLayer` array used by gtag. */     
L4370:  dataLayerName?: string;

[12:36:30] typescript: node_modules/firebase/index.d.ts, line: 4369 Cannot find name 'T'.

L4368:  gtagName?: string;
L4369:  /** Sets custom name for `dataLayer` array used by gtag. */ 
L4370:  dataLayerName?: string;

To Reproduce Steps to reproduce the behavior:

  1. Create a new ionic 3 project
  2. Install below packages
ionic cordova plugin add cordova-plugin-firebase
npm install --save @ionic-native/firebase
npm install --save angularfire2 firebase
  1. Run npm run build
  2. You get the above error

You can find my code at https://github.com/KishoreKoushik/PushNotification.git

AhsanSN commented 4 years ago

i am facing the same error

SHROUD1995 commented 4 years ago

I got this error too. How can i solve this

cool-projects commented 4 years ago

Just install the latest version of typescript.

npm i typescript@latest

AhsanSN commented 4 years ago

Just install the latest version of typescript.

npm i typescript@latest

This worked.

DiegoPeralta1987 commented 4 years ago

I am facing the same problem as I can solve this?

JosephRadebe commented 4 years ago

Diego use the command below to update to the latest typescript.

npm i typescript@latest

RonaldoJB45 commented 4 years ago

work to me install firebase

npm i firebase@4.6.2