TS2339 🟩 Node.js

TS2339: Property 'x' does not exist on type 'Y'.

TypeScript’s type for the object doesn’t include that property.

Seen on: Node.js

Meaning

The type is too narrow (e.g. {} or a union), the property name is misspelled, or data from JSON/APIs isn’t typed. Don’t silence with any — describe the shape.

Common causes

  • Untyped/loosely typed data ({} / unknown)
  • Union type where only some members have the property
  • Typo
  • Extending window/Request without declaration merging

⚡ Quick fix

  1. Define an interface for the data
  2. Narrow unions with in / type guards
  3. Use declaration merging for window or express Request

Detailed fix by platform

Node.js

  1. declare global { namespace Express { interface Request { user?: User } } }

How to diagnose

  1. Type — What type does TS infer?
  2. Property — Should it exist on all variants?

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