-
Notifications
You must be signed in to change notification settings - Fork 373
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
Conflicting Types for @types/node when using node 14 #1121
Comments
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight. |
for some reason if I downgrade firebase-admin to 9.0.0 it seems to work fine |
That's strange. Both v9.0.0 and v9.4.0 depends on same version of https://github.com/firebase/firebase-admin-node/blob/v9.0.0/package.json#L58 However, v9.4.0 ships with auto-generated typings that contains This is partially related to #1100. I'm not sure what the right fix in this case could be. Will continue to explore options. Also appreciate any thoughts from other TS experts who might know better. |
This has proven to be a problem for us also. Please consider to work on it. |
+1 this issue is preventing us from upgrading as well |
I was also having this issue, but I only needed to downgrade to |
+1 I have downgraded to |
This is a major issue preventing the usage of admin sdk 9.7.0. |
I started a PR to fix this issue. I also published a temporary package "firebase-admin-nikhilag" (https://www.npmjs.com/package/firebase-admin-nikhilag) to unblock my own project. |
I don't think the PR will actually "fix" this issue (see my comment on the PR). You will most likely need a project-level workaround like this in the
|
@hiranya911 Thanks for reviewing the fix. With my fix, I did try with |
I'm trying to repro the original issue, but so far haven't been able to. I've tried Here's one of the configurations I tested:
import { Agent } from 'http';
import * as admin from 'firebase-admin';
export function init(agent: Agent): admin.app.App {
return admin.initializeApp({
httpAgent: agent,
});
}
export function createCustomToken(): Promise<string> {
const auth: admin.auth.Auth = admin.auth();
return auth.createCustomToken('alice');
};
export function addUser(): Promise<void> {
const db: admin.firestore.Firestore = admin.firestore();
return db.collection('users').doc().set({uid: 'alice'})
.then(() => {
console.log('DONE');
});
} |
@hiranya911 I will work over the weekend to try to find a repro. In my backend code, I did check that 9.7.0 is failing but 9.8.0 is working correctly. |
@hiranya911 I was unable to repro the issue using your code but in my backend code, I get these errors (and more):- Tried a bunch of imports but nothing seemed to break in your code above. Will definitely give it a few more tries. |
Going to close this for now, since #1258 provides a solution for now. |
Thank you for submitting your issue. We are operating at reduced capacity from Dec 18 2020 to Jan 4 2021. Please expect delayed responses. For more urgent requests please reach us via our support channels https://firebase.google.com/support
[READ] Step 1: Are you in the right place?
template.
with the firebase tag.
google group.
of the above categories, reach out to the personalized
Firebase support channel.
[REQUIRED] Step 2: Describe your environment
[REQUIRED] Step 3: Describe the problem
When using node 14 with typescript's @types/[email protected], attempting to compile with tsc gives a conflicting definition of 'node' error:
I need to use node 14 because something in fs-extra is broken in node 12.
Steps to reproduce:
Relevant Code:
The text was updated successfully, but these errors were encountered: