After following a tutorial, I used the command nest new my-nestjs-01
to create a default nestjs project. I then configured Webstorm to run typescript files by setting up some options.
Now, when I open a .ts
file in the editor and click at the top, the current opened file gets executed. However, when I try to execute main.ts, I encounter an error:
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.
I tried to add additional options to tsconfig.json
to resolve the issue but it didn't work out. Here's a snippet of the code:
tsconfig.json:
{
// Compiler options here
}
main.ts:
import { NestFactory } from '@nestjs/core';
// More code here...
app.module.ts:
// Code snippet for AppModule here
If anyone can provide guidance on how to fix this issue, I would greatly appreciate it.
EDIT:
I tried the suggested solution mentioned in an answer on stackoverflow but unfortunately, it did not solve my problem.