firebase / firebase/firebase-admin-node

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

Abierto
#2,062 7 comentarios 1 reacción 0 asignados Ver en GitHub
api: firestore needs-triage
Lenguaje dominante
TypeScript
Estrellas
1.7k
Forks
419
Merge medio
3 d 10 h
PR fusionados (30 d)
16

Descripción

### [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`.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.