0
votes

I am trying to get firebase working on my Angular 8 application.

I deleted my node_modules ran npm install ran npm install --save firebase @angular/fire ran npm run build

I get the following error

ERROR in node_modules/firebase/nidex.d.ts(4396, 38): error TS1005: ';' expected

I tried a few steps from other posts but no success yet. Any help is appreciated.

My node version is v10.16.3

Here is my package.json

   {
  "name": "material-dashboard-angular",
  "version": "2.1.0",
  "license": "MIT",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@agm/core": "1.0.0-beta.2",
    "@angular/animations": "5.2.9",
    "@angular/cdk": "5.2.4",
    "@angular/common": "5.2.9",
    "@angular/compiler": "5.2.9",
    "@angular/core": "5.2.9",
    "@angular/fire": "^5.2.1",
    "@angular/forms": "5.2.9",
    "@angular/http": "5.2.9",
    "@angular/material": "5.2.4",
    "@angular/platform-browser": "5.2.9",
    "@angular/platform-browser-dynamic": "5.2.9",
    "@angular/platform-server": "5.2.9",
    "@angular/router": "5.2.9",
    "ajv": "6.4.0",
    "arrive": "2.4.1",
    "bootstrap": "4.1.0",
    "bootstrap-material-design": "4.1.1",
    "bootstrap-notify": "3.1.3",
    "chartist": "0.11.0",
    "classlist.js": "1.1.20150312",
    "core-js": "2.4.1",
    "firebase": "^7.3.0",
    "googleapis": "28.1.0",
    "hammerjs": "2.0.8",
    "jquery": "3.2.1",
    "moment": "2.18.1",
    "perfect-scrollbar": "1.1.0",
    "popper.js": "1.14.3",
    "rxjs": "5.5.10",
    "web-animations-js": "2.3.1",
    "zone.js": "0.8.4"
  },
  "devDependencies": {
    "@angular/cli": "1.7.4",
    "@angular/compiler-cli": "5.2.9",
    "@angular/language-service": "5.2.9",
    "@types/bootstrap": "3.3.32",
    "@types/chartist": "0.9.34",
    "@types/googlemaps": "^3.30.8",
    "@types/jasmine": "2.5.38",
    "@types/jquery": "1.10.31",
    "@types/node": "6.0.73",
    "codelyzer": "4.2.1",
    "jasmine-core": "3.1.0",
    "jasmine-spec-reporter": "4.2.1",
    "karma": "2.0.0",
    "karma-chrome-launcher": "2.2.0",
    "karma-cli": "1.0.1",
    "karma-coverage-istanbul-reporter": "1.4.2",
    "karma-jasmine": "1.1.1",
    "protractor": "5.3.1",
    "ts-node": "5.0.1",
    "tslint": "5.9.1",
    "typescript": "2.4.2"
  }
}
2
U have installed Angular 5 not 8Mises

2 Answers

4
votes

npm i [email protected] [email protected] --save

for ionic3, these versions are compatible to each other

1
votes

You have installed Angular 5 not 8. This is how dependencies looks like in angular 8:

"dependencies": {
    "@angular/animations": "~8.2.8",
    "@angular/cdk": "~8.2.2",
    "@angular/common": "~8.2.8",
    "@angular/compiler": "~8.2.8",
    "@angular/core": "~8.2.8",
    "@angular/fire": "^5.2.1",
    "@angular/forms": "~8.2.8",
    "@angular/material": "^8.2.2",
    "@angular/platform-browser": "~8.2.8",
    "@angular/platform-browser-dynamic": "~8.2.8",
    "@angular/router": "~8.2.8",
    "firebase": "^7.1.0",
    "hammerjs": "^2.0.8",
    "rxjs": "~6.4.0",
    "tslib": "^1.10.0",
    "zone.js": "~0.9.1"
  }

Forgot about devDependencies:

"devDependencies": {
    "@angular-devkit/build-angular": "~0.803.6",
    "@angular/cli": "~8.3.6",
    "@angular/compiler-cli": "~8.2.8",
    "@angular/language-service": "~8.2.8",
    "@types/jasmine": "~3.3.8",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "~8.9.4",
    "codelyzer": "^5.0.0",
    "jasmine-core": "~3.4.0",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~4.1.0",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~2.0.1",
    "karma-jasmine": "~2.0.1",
    "karma-jasmine-html-reporter": "^1.4.0",
    "protractor": "~5.4.0",
    "ts-node": "~7.0.0",
    "tslint": "~5.15.0",
    "typescript": "~3.5.3"
  }