Common causes
- Using class decorators (@Component, @Injectable, @Entity) without enabling experimentalDecorators
- Following a framework tutorial that assumes experimental decorators are already on
- A new tsconfig.json was generated but framework-specific options weren't added
- tsconfig.json was reset or overwritten and the decorator option was lost
How to fix it
- Add to tsconfig.json compilerOptions: { "experimentalDecorators": true }
- Also add emitDecoratorMetadata: true if using dependency injection (Angular, NestJS)
- Use the framework's recommended tsconfig template — Angular CLI and NestJS CLI generate a correct config
- For TypeScript 5.0+, check if your framework supports the new standard decorators proposal
Example
@Injectable()
class UserService { }
// error TS1219: Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option in your 'tsconfig' or 'jsconfig' to remove this warning.Using NestJS @Injectable() decorator without experimentalDecorators in tsconfig.json
Browse more errors
The Developer Hub covers 150+ errors across Git, npm, Node.js, Python, TypeScript, and Docker — with plain-English explanations and fix steps.
