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
- npm i -D @types/package
- Add declare module 'package'; in a .d.ts file
- Check the package for a types/typings field
Detailed fix by platform
Node.js
npm i -D @types/express
How to diagnose
- Types — Does @types/name exist?
- 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.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 2 Oct 2026