Skip to content
This repository was archived by the owner on Feb 7, 2026. It is now read-only.
This repository was archived by the owner on Feb 7, 2026. It is now read-only.

TypeScript compilation error related to @types/express #243

@JustinBeckwith

Description

@JustinBeckwith

With a brand new module, that only has @google-cloud/logging-bunyan and bunyan installed, I get this error message:

> tsc -p .

node_modules/@google-cloud/logging/build/src/middleware/express/make-middleware.d.ts:16:49 - error TS7016: Could not find a declaration file for module 'express'. '/Users/beckwith/Code/node_modules/express/index.js' implicitly has an 'any' type.
  Try `npm install @types/express` if it exists or add a new declaration (.d.ts) file containing `declare module 'express';`

16 import { Request, Response, NextFunction } from 'express';
                                                   ~~~~~~~~~

Installing @types/express made the bad message go away. We should probably be distributing those types along with the package.

Metadata

Metadata

Assignees

Labels

🚨This issue needs some love.api: loggingIssues related to the googleapis/nodejs-logging-bunyan API.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions