I'm trying to build my angular application which uses firebase with 'ng build' command. But the build is broken with firebase 4.8.1 with following error message. 4.6.1 works well.
ERROR in node_modules/@firebase/database/dist/esm/src/api/Database.d.ts(4,33): error TS2307: Cannot find module '@firebase/app-types/private'.
node_modules/@firebase/database/dist/esm/src/core/AuthTokenProvider.d.ts(17,39): error TS2307: Cannot find module '@firebase/app-types/private'.
This solved my issue, are type definitions going to be updated/fixed for future releases?
Hey guys! This specific issue has been resolved in #391. We will also be rolling back part of the change that surfaced this so you shouldn't see the issue any more 馃槃 in the next release.
Thanks!
Getting this with version 4.8.1. How can I add typedefinitions?
For me doing the following gives the error.
import { FirebaseOptions } from '@firebase/app-types';
Hi guys, I am working on Ionic2 project with firebase
I tried this
But unable to resolve the following issue in ionic2
typescript: Users/vyas/node_modules/@firebase/database/dist/esm/src/api/Database.d.ts, line: 4
Cannot find module '@firebase/app-types/private'.
L3: import { FirebaseApp } from '@firebase/app-types';
L4: import { FirebaseService } from '@firebase/app-types/private';
[08:59:27] typescript: ...rs/vyas/node_modules/@firebase/database/dist/esm/src/core/AuthTokenProvider.d.ts, line: 17
Cannot find module '@firebase/app-types/private'.
L16: getToken(forceRefresh: boolean): Promise<FirebaseAuthTokenData>;
L17: addTokenChangeListener(listener: (token: string | null) => void): void;
L18: removeTokenChangeListener(listener: (token: string | null) => void): void;
Can any body help me with this.
@vyasm9 Have you found the solution? I am having the same problem as you.
Yes I recreated the project and then installed angular fire
npm install angularfire2 [email protected] --save
And copied the old files into new project
@vyasm9 Thankyou so much!
hey By creating new file and copying old files into that will giv solution for the error .....?@vyasm9
Yes by I recreated the project and then installed angular fire like this will solve the issue.
npm install angularfire2 [email protected] --save
And copied the old files into new project
From a typings perspective it would appear that 4.8.1 / 4.8.2 was a big step forward but a small step back with this error. I'd hate to go back to 4.8.0 for this reason ... is there a way to address this error with 4.8.2?
Ok, I think I have an answer to my own question:
npm install --save-dev @firebase/app-types
Seems to do it for me.
@ksnyde the issue described here was fixed in version 4.8.2 (including the behavior you mentioned). Please feel free to open another issue if the currently released version isn't working properly for you and we can get it sorted out.
@jshcrowthe ok that's great news. Will there be a 4.8.2 release of the admin api soon? I have a series of libraries which use either 4.8.1 for admin-api (the latest currently) for backend consumers and 4.8.2 for the client consumers.
@ksnyde the Admin SDK takes a dependency on the @firebase/database module for this piece. It is a range version (currently ^0.1.3) so the updated 0.1.8 version should be picked up automatically on a clean NPM install.
Most helpful comment
I have answered this here https://stackoverflow.com/questions/47949311/cannot-find-module-firebase-app-types-private-firebase-throws-error/47949323#47949323