TS7016 🟩 Node.js

TS7016: Could not find a declaration file for module 'x'. 'x.js' implicitly has an 'any' type.

The JavaScript package has no TypeScript types bundled and no @types package installed.

Seen on: Node.js

Meaning

With noImplicitAny/strict, untyped imports error. Install @types/package if it exists, or write a minimal declaration.

Common causes

  • Package without types
  • @types package not installed
  • Types published under a different name

⚡ Quick fix

  1. npm i -D @types/package
  2. Add declare module 'package'; in a .d.ts file
  3. Check the package for a types/typings field

Detailed fix by platform

Node.js

  1. npm i -D @types/express

How to diagnose

  1. Types — Does @types/name exist?
  2. Recent change — Did it start after a deploy, upgrade, or configuration change? Compare with the last working version.

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.