TS7016 Node.js Origin: Application & API Last updated 15 Oct 2026

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.

Exact message you may see Could not find a declaration file for moduleimplicitly has an 'any' type
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 not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Application & API. Errors that are often confused with or caused by this one (click to open):

Cannot convert value of type — Swift: Cannot convert value of type 'X' to expected argument type 'Y' (iOS)Cannot convert value …ClassCastException — java.lang.ClassCastException: class A cannot be cast to class B (Java)ClassCastExceptionE0308 — Rust: error[E0308]: mismatched types — expected `X`, found `Y` (Rust)E0308ERR_INVALID_ARG_TYPE — TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined (Node.js)ERR_INVALID_ARG_TYPEERR_UNKNOWN_FILE_EXTENSION — TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" (Node.js)ERR_UNKNOWN_FILE_EXTE…TS2304 — TS2304: Cannot find name 'x'. (Node.js)TS2304TS2307 — TS2307: Cannot find module 'x' or its corresponding type declarations. (Node.js)TS2307TS2322 — TS2322: Type 'X' is not assignable to type 'Y' (TypeScript)TS2322TS7016

Explore the map of this error Full error map →

🧠 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.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.