I am creating a new project in angular 18. When entering the app.component file my text editor (vscode) shows me an error in the @Component decorator."This syntax requires an imported helper but module 'tslib' cannot be found.ts(2354)"

Now the "temporary" solution I found was in the tsconfig.json file to change the moduleResolution property from "bundler" to "node".
{
...
"compilerOptions": {
...
"moduleResolution": "node" //"bundler"
}
Now I don't understand exactly why this happens. I already removed all my extensions from the editor and I can't find any other solution than what I already mentioned.
I found a solution to this problem with Blunder, you just have to comment out or remove the importHelpers line from tsconfig.json and configure it in the compillerOptions of tsconfig.app.json.
tsconfig.json
tsconfig.app.json
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With