firebase / firebase/firebase-admin-node

Cannot find module '@firebase/logger' or its corresponding type declarations

Offen
#2,062 7 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
api: firestore needs-triage
Vorherrschende Sprache
TypeScript
Sterne
1.7k
Forks
419
Ø Merge
3 T. 10 Std.
Gemergte PRs (30 T.)
16

Beschreibung

### [READ] Step 1: Are you in the right place?

**Cloud Firestore support is provided by the [`@google-cloud/firestore`](https://npmjs.com/package/@google-cloud/firestore) library. Therefore the easiest and most efficient way to get Firestore issues resolved is by directly reporting them at the [nodejs-firestore](https://github.com/googleapis/nodejs-firestore) GitHub repo.**

If you still think the problem is related to the code in this repository, then read on.

* For issues or feature requests related to __the code in this repository__
file a Github issue.
* For general technical questions, post a question on [StackOverflow](http://stackoverflow.com/)
with the firebase tag.
* For general Firebase discussion, use the [firebase-talk](https://groups.google.com/forum/#!forum/firebase-talk)
google group.
* For help troubleshooting your application that does not fall under one
of the above categories, reach out to the personalized
[Firebase support channel](https://firebase.google.com/support/).

### [REQUIRED] Step 2: Describe your environment

* Operating System version: macOS Ventura 13.1
* Firebase SDK version: v11.5.0
* Firebase Product: Firestore
* Node.js version: v16.19.0
* NPM version: v8.19.3

### [REQUIRED] Step 3: Describe the problem

#### Steps to reproduce:

Execute `yarn build` in the project firebase-admin SDK has installed.

#### Relevant Code:

```TypeScript
app.listen(app.get('port'), async () => {
try {
firebaseAdmin.initializeApp({
credential: firebaseAdmin.credential.cert({
projectId: env.FIREBASE.project_id,
clientEmail: env.FIREBASE.client_email,
privateKey: env.FIREBASE.private_key,
}),
});
...
} catch (err) {
console.error(err);
}
});
```

#### Error message:

```
.yarn/cache/@firebase-app-types-npm-0.9.0-c08aff84f3-e79bd3c4a8.zip/node_modules/@firebase/app-types/index.d.ts:17:57 - error TS2307: Cannot find module '@firebase/logger' or its corresponding type declarations.
```

This issue reproduced after migrating npm to yarn. It was ok with `npm build`.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.