title: angular error: Cannot find module 'firebase/app'
body: <p>I am trying to follow codelab of google here:
  <a href="https://codelabs.developers.google.com/codelabs/firebase-cloud-functions-angular/index.html?index=..%2F..index#5" rel="nofollow noreferrer">https://codelabs.developers.google.com/codelabs/firebase-cloud-functions-angular/index.html?index=..%2F..index#5</a></p>
  
  <p>when I try to build the project: ng build --prod, I got the following error:</p>
  
  <blockquote>
    <p>ERROR in node_modules/@angular/fire/database/interfaces.d.ts(2,26):
    error TS2307: Cannot find module 'firebase/app'.</p>
  </blockquote>
  
  <p><strong>package.json</strong></p>
  
  <pre><code> "dependencies": {
      "@angular/animations": "^5.2.0",
      "@angular/cdk": "^5.2.0",
      "@angular/common": "^5.2.0",
      "@angular/compiler": "^5.2.0",
      "@angular/core": "^5.2.0",
      "@angular/fire": "^5.1.1",
      "@angular/forms": "^5.2.0",
      "@angular/http": "^5.2.0",
      "@angular/material": "^5.2.0",
      "@angular/platform-browser": "^5.2.0",
      "@angular/platform-browser-dynamic": "^5.2.0",
      "@angular/router": "^5.2.0",
      "angularfire2": "^5.0.0-rc.6.0",
      "core-js": "^2.4.1",
      "firebase": "^5.8.6",
      "rxjs": "^5.5.6",
      "tslib": "^1.9.0",
      "zone.js": "^0.8.19"
    },
    "devDependencies": {
      "@angular-devkit/build-angular": "~0.13.0",
      "@angular/cli": "^7.3.5",
      "@angular/compiler-cli": "^5.2.0",
      "@angular/language-service": "^5.2.0",
      "@types/jasmine": "~2.8.3",
      "@types/jasminewd2": "~2.0.2",
      "@types/node": "~6.0.60",
      "codelyzer": "^4.0.1",
      "jasmine-core": "~2.8.0",
      "jasmine-spec-reporter": "~4.2.1",
      "karma": "~2.0.0",
      "karma-chrome-launcher": "~2.2.0",
      "karma-coverage-istanbul-reporter": "^1.2.1",
      "karma-jasmine": "~1.1.0",
      "karma-jasmine-html-reporter": "^0.2.2",
      "protractor": "~5.1.2",
      "ts-node": "~4.1.0",
      "tslint": "~5.9.1",
      "typescript": "~2.5.3"
    }
  </code></pre>
  
  <p><strong>ng --version give:</strong></p>
  
  <pre><code>@angular-devkit/architect         0.13.5
  @angular-devkit/build-angular     0.13.5
  @angular-devkit/build-optimizer   0.13.5
  @angular-devkit/build-webpack     0.13.5
  @angular-devkit/core              7.3.5
  @angular-devkit/schematics        7.3.5
  @angular/cdk                      5.2.5
  @angular/cli                      7.3.5
  @angular/fire                     5.1.1
  @angular/material                 5.2.5
  @ngtools/webpack                  7.3.5
  @schematics/angular               7.3.5
  @schematics/update                0.13.5
  rxjs                              5.5.12
  typescript                        2.5.3
  webpack                           4.29.0
  </code></pre>
  
  <blockquote>
    <p>firebase --version
    6.4.0</p>
  </blockquote>
  
  <p><strong>I have tried to search on stackoverflow and try a few things which doesn't work:</strong></p>
  
  <pre><code>npm uninstall firebase
  npm install firebase@4.8.0
  rm -rf node_modules
  npm install
  </code></pre>
  
  <p><strong>or try using newest firebase:</strong> </p>
  
  <pre><code>npm uninstall firebase
  npm install firebase
  rm -rf node_modules
  npm install
  </code></pre>
  
  <p>also doesn't work.</p>
  
  <p>I would really appriciate any help,
  An</p>