Cannot find module '@firebase/app-types/private'

There's a problem with the newest npm firebase package (v4.8.1).

To fix this problem, in your terminal. Type

npm uninstall --save firebase

Now, open your package.json file. There, you will find:

"angularfire2": "^5.0.0-rc.4",

Below this line, add a this line (Note, here is no Caret(^) symbol):

"firebase": "4.8.0",

After saving, hit npm install. Now, your application will work fine and smooth.


Change your firebase version back to 4.8.0. There was an issue in type definitions and its no longer work after updating from 4.8.0 to 4.8.1.

So change the version in the package.json file. remove the ^

"angularfire2": "^5.0.0-rc.4",
"firebase": "4.8.0",

Now execute the npm install command. This will install the 4.8.0 version

For further info refer this and this.