-
Notifications
You must be signed in to change notification settings - Fork 2.2k
ERROR in node_modules/angularfire2/auth/auth.d.ts(10,20): error TS2503: Cannot find namespace 'firebase'. #1387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I started getting this error last night as well out of the blue. I even reran builds that has just completed successfully that then failed with no changes. I think this new error may be related to the firebase refactoring specified in the latest comments in #1385 There is a PR open for this issue. #1386 |
@rts-cwalker The same happened to me. Changing it to firebase 4.8.0 fixed the issue as stated in the other thread. |
@a-cordoba10 You building locally? Bc I changed to 4.8.0 in my package.json file, but I cant change it in angularfire 2 dependencies when it builds on Travis CI. |
Im building locally, but now im getting this error when building my auth service ERROR in ../../../node_modules/@firebase/database/dist/esm/src/api/Database.d.ts(4,33): error TS2307: Cannot find module '@firebase/app-types/private'. |
@a-cordoba10 that is 4.8.1 catching ya firebase/firebase-js-sdk#387 (comment) |
@myspivey How? In my package.json I have "angularfire2": "5.0.0-rc.4", and "firebase": "4.8.0", (I have also tried with "firebase": "4.7.0") and after npm install I still have the problem |
Think AF2 is grabbing it and some fighting is going on. Try seeing what is inside AF2. |
Well I at least figured out what i was doing wrong.... Forgot to remove the prefix that allowed patch versions to be installed. Thus it kept installing 4.8.1 |
@a-cordoba10 Make sure you dont have a leading |
4.8.1 was a refactor of the typings and you now pull your imports from @firebase:
I found this, maybe we can make some update ? |
@rts-cwalker thanks, I don't see that, Can't believe they release breaking change in xmas |
Whats just as shocking is that its released as a "patch" release.. Breaking changes should AT LEAST be minor version release. |
finally !!! i know the problem and could fix it with a downgrade to 4.8.0 |
Can we get a warning next before breaking changes come in.... |
Firebase really should have done this refactor this at a SemVer major point since it is going to break everyone's TypeScript builds. Instead they did it between 4.8.0 and 4.8.1. |
I'm getting this same error right now, downgraded, upgraded, did everything but still didn't work. My error log looks like so:
When is a bug fix likely to be released? |
mayordwells you need to downgrade Firebase to 4.8.0. That will resolve till a fix is out. |
Downgrading to firebase 4.8.0 fixed it for me |
@asgarli Thanks, I'll try to do the same. |
this resolution doesnt work for me.
|
@darlondjc can you verify what /node_modules/firebase/package.json reports as the version? Your setup looks fine. |
|
Upgrading angularfire2 and downgrading firebase fixed it for me. "dependencies": { |
"angularfire2": "5.0.0-rc.5", and "firebase": "4.8.0" did not work yet. :( |
"angularfire2": "5.0.0-rc.5", and "firebase": "4.8.0" did work for me :) |
@darlondjc , did you ran npm update on the root folder? I was missing that step |
@cdosorio i did it right now (again), just for confirm, but stays the same error.
|
I have "angularfire2": "5.0.0-rc.4", and "firebase": "4.8.1", (Downgrading to firebase "4.8.0") and after npm install I Worked here. Be sure on your package.json file that the firebase and angularfire2 version doesn't have the ^ symbol, otherwise you will be importing version 4.8.1 not 4.8.0.: |
Hi all, I had the same issue as most on my MacBook. I pulled my code onto my windows machine and the downgrade works. Not sure what's different between the two, both using VS Code |
@MihowBogucki if you search the issue, it's a known issue with firebase 4.8.1 |
did anyone try |
I restored my package.json to |
Hi, guys. I'm working with ionic3, angularfire2, and firebase. |
Following the above steps (down grading to 4.8.0) does not fix this glitch for me, this is holding up production release; "dependencies": { |
Updating to version "firebase": "^4.8.2", should fix the issue. |
Still struggling with this issue; upgrading like this: still results in this and other errors: error TS2307: Cannot find module '@firebase/app-types/private'. Here are my dependencies; please help - struggling for days on this. "dependencies": { |
@a-cordoba10 @rts-cwalker @myspivey @hiepxanh @rezid @timstoute @JimmyOnGitHub @YoungsooJang @houfu @nueko @jhcao23 @nunesdaniel @MihowBogucki @tuballeonel @oluway @kamrulhassan Can you try |
Thank you @davideast - webpack now compiles successfully here. |
work great, love you @davideast ✌️ |
Fixed in the latest release. |
In firebase 4.9.0 there is no errors :) |
Updating both fixed it for me.
|
thank you much Daneile-pecora, I updated firebase to "^4.9.1, it's work perfectly. |
Can someone help...I'm still getting the same issue. Followed all of the steps above to install "firebase": "4.8.0",
[20:53:56] typescript: node_modules/angularfire2-offline/database/object/afo-object-observable.d.ts, line: 53
[20:53:56] typescript: node_modules/angularfire2-offline/database/object/afo-object-observable.d.ts, line: 63
[20:53:56] typescript: node_modules/angularfire2/app/firebase.app.module.d.ts, line: 5
[20:53:56] typescript: node_modules/angularfire2/app/firebase.app.module.d.ts, line: 12
[20:53:56] typescript: node_modules/angularfire2/database/firebase_list_observable.d.ts, line: 14
[20:53:56] typescript: node_modules/angularfire2/database/firebase_list_observable.d.ts, line: 15
[20:53:56] typescript: node_modules/angularfire2/database/firebase_list_observable.d.ts, line: 16
[20:53:56] typescript: node_modules/angularfire2/database/firebase_object_observable.d.ts, line: 11
[20:53:56] typescript: node_modules/angularfire2/database/firebase_object_observable.d.ts, line: 12
[20:53:56] typescript: node_modules/angularfire2/database/firebase_object_observable.d.ts, line: 13
[20:53:56] typescript: node_modules/angularfire2/interfaces.d.ts, line: 12
[20:53:56] typescript: node_modules/angularfire2/interfaces.d.ts, line: 13
[20:53:56] typescript: node_modules/angularfire2/interfaces.d.ts, line: 14
[20:53:56] typescript: node_modules/angularfire2/interfaces.d.ts, line: 15
[20:53:56] typescript: src/pages/home/home.ts, line: 154
[20:53:56] typescript: src/pages/settings/settings.ts, line: 88
[20:53:56] typescript: src/providers/firebase-service/firebase-service.ts, line: 25
[20:53:56] typescript: src/providers/firebase-service/firebase-service.ts, line: 36
[20:53:56] typescript: src/providers/login-service/login-service.ts, line: 27
Error: Failed to transpile program |
I am still getting the same error on |
@arashbi Looks like they released 5.0.0-rc.10 the day after you posted. The following combination is working for me:
|
@ZenPylon I have the same combination, however, I get the following error:
|
Friends, I have a problem. In trying to install firebase, I add this : npm ERR! code ERR_STREAM_WRITE_AFTER_END Please help me. Also I would like to know the usefulness of : "promise-polyfill": "^6.0.2", here are my dependencies; "dependencies": { |
{ |
The following combination is working for me: |
This Combination is not working for me Nor this I'm using angular 8 and ionic 5. please help if you got desired solution' |
@VajpayeeShashi why don't you use "@angular/fire && firebase" Because this is an old issue unless you're working on a legacy project using "angularfire2" the when importing firebase try using "firebase/app" |
I am not using the "angularfire2" I "@angular/fire": "^6.0.0", "firebase": "^7.14.6", still i get this : ERROR in node_modules/@angular/fire/angularfire2.d.ts(37,49): error TS2344: Type 'T[K]' does not satisfy the constraint '(...args: any) => any'. If I add "skipLibCheck": true, it is working any ideas. Thanks in advance |
Angular: 5.0
Firebase: 4.8.1
AngularFire: 5.0.0-rc.4
Other (e.g. Ionic/Cordova, Node, browser, operating system):
no
How to reproduce these conditions
Steps to set up and reproduce
Follow the Installation & Setup guide in the agunlarfire 2 github
Sample data and security rules
<-- include/attach/link to some json sample data (or provide credentials to a sanitized, test Firebase project) -->
Debug output
** Errors in the JavaScript console **
** Output from
firebase.database().enableLogging(true);
**** Screenshots **
ERROR in node_modules/angularfire2/auth/auth.d.ts(10,20): error TS2503: Cannot find namespace 'firebase'.
node_modules/angularfire2/auth/auth.d.ts(11,36): error TS2503: Cannot find namespace 'firebase'.
node_modules/angularfire2/firebase.app.module.d.ts(5,45): error TS2503: Cannot find namespace 'firebase'.
node_modules/angularfire2/firebase.app.module.d.ts(8,17): error TS2503: Cannot find namespace 'firebase'.
node_modules/angularfire2/firebase.app.module.d.ts(9,21): error TS2503: Cannot find namespace 'firebase'.
node_modules/angularfire2/firebase.app.module.d.ts(10,22): error TS2503: Cannot find namespace 'firebase'.
node_modules/angularfire2/firebase.app.module.d.ts(11,20): error TS2503: Cannot find namespace 'firebase'.
node_modules/angularfire2/firebase.app.module.d.ts(13,22): error TS2503: Cannot find namespace 'firebase'.
node_modules/angularfire2/firestore/collection/changes.d.ts(8,43): error TS2503: Cannot find namespace 'firebase'.
node_modules/angularfire2/firestore/collection/changes.d.ts(9,46): error TS2503: Cannot find namespace 'firebase'.
node_modules/angularfire2/firestore/collection/changes.d.ts(9,80): error TS2503: Cannot find namespace 'firebase'.
node_modules/angularfire2/firestore/collection/changes.d.ts(10,49): error TS2503: Cannot find namespace 'firebase'.
node_modules/angularfire2/firestore/collection/changes.d.ts(10,95): error TS2503: Cannot find namespace 'firebase'.
node_modules/angularfire2/firestore/collection/changes.d.ts(10,140): error TS2503: Cannot find namespace 'firebase'.
node_modules/angularfire2/firestore/collection/changes.d.ts(10,182): error TS2503: Cannot find namespace 'firebase'.
node_modules/angularfire2/firestore/collection/changes.d.ts(11,49): error TS2503: Cannot find namespace 'firebase'.
node_modules/angularfire2/firestore/collection/changes.d.ts(11,94): error TS2503: Cannot find namespace 'firebase'.
node_modules/angularfire2/firestore/collection/changes.d.ts(11,130): error TS2503: Cannot find namespace 'firebase'.
node_modules/angularfire2/firestore/collection/collection.d.ts(8,54): error TS2503: Cannot find namespace 'firebase'.
node_modules/angularfire2/firestore/collection/collection.d.ts(8,96): error TS2503: Cannot find namespace 'firebase'.
node_modules/angularfire2/firestore/collection/collection.d.ts(10,19): error TS2503: Cannot find namespace 'firebase'.
node_modules/angularfire2/firestore/collection/collection.d.ts(12,22): error TS2503: Cannot find namespace 'firebase'.
node_modules/angularfire2/firestore/collection/collection.d.ts(12,69): error TS2503: Cannot find namespace 'firebase'.
node_modules/angularfire2/firestore/collection/collection.d.ts(13,27): error TS2503: Cannot find namespace 'firebase'.
node_modules/angularfire2/firestore/collection/collection.d.ts(14,25): error TS2503: Cannot find namespace 'firebase'.
node_modules/angularfire2/firestore/collection/collection.d.ts(15,30): error TS2503: Cannot find namespace 'firebase'.
node_modules/angularfire2/firestore/collection/collection.d.ts(16,27): error TS2503: Cannot find namespace 'firebase'.
node_modules/angularfire2/firestore/collection/collection.d.ts(17,27): error TS2503: Cannot find namespace 'firebase'.
node_modules/angularfire2/firestore/document/document.d.ts(8,10): error TS2503: Cannot find namespace 'firebase'.
node_modules/angularfire2/firestore/document/document.d.ts(9,22): error TS2503: Cannot find namespace 'firebase'.
node_modules/angularfire2/firestore/document/document.d.ts(10,28): error TS2503: Cannot find namespace 'firebase'.
node_modules/angularfire2/firestore/document/document.d.ts(14,42): error TS2503: Cannot find namespace 'firebase'.
node_modules/angularfire2/firestore/firestore.d.ts(9,55): error TS2503: Cannot find namespace 'firebase'.
node_modules/angularfire2/firestore/firestore.d.ts(12,25): error TS2503: Cannot find namespace 'firebase'.
node_modules/angularfire2/firestore/interfaces.d.ts(4,11): error TS2503: Cannot find namespace 'firebase'.
node_modules/angularfire2/firestore/interfaces.d.ts(5,14): error TS2503: Cannot find namespace 'firebase'.
node_modules/angularfire2/firestore/interfaces.d.ts(14,37): error TS2503: Cannot find namespace 'firebase'.
node_modules/angularfire2/firestore/interfaces.d.ts(14,80): error TS2503: Cannot find namespace 'firebase'.
node_modules/angularfire2/firestore/interfaces.d.ts(16,10): error TS2503: Cannot find namespace 'firebase'.
node_modules/angularfire2/firestore/interfaces.d.ts(17,12): error TS2503: Cannot find namespace 'firebase'.
node_modules/angularfire2/firestore/observable/fromRef.d.ts(6,41): error TS2503: Cannot find namespace 'firebase'.
node_modules/angularfire2/firestore/observable/fromRef.d.ts(6,80): error TS2503: Cannot find namespace 'firebase'.
node_modules/angularfire2/firestore/observable/fromRef.d.ts(7,41): error TS2503: Cannot find namespace 'firebase'.
node_modules/angularfire2/firestore/observable/fromRef.d.ts(7,98): error TS2503: Cannot find namespace 'firebase'.
node_modules/angularfire2/firestore/observable/fromRef.d.ts(8,48): error TS2503: Cannot find namespace 'firebase'.
node_modules/angularfire2/firestore/observable/fromRef.d.ts(8,93): error TS2503: Cannot find namespace 'firebase'.
Expected behavior
Project compiles successfully
Actual behavior
The project doesn't compile
The text was updated successfully, but these errors were encountered: