Visual Studio 2019 typescript intellisense error TS2792 with import from '@angular/core'

Viewed 45

In Visual Studio 2019, I am running an Angular 14 project. While I am able to compile everything just fine with the Angular CLI, within Visual Studio I am getting an intellisense error for basically everything in the node_modules folder. It's very annoying, and I have so far been unable to fix it. Any ideas what I can do?

Screenshot of error: enter image description here

My tsconfig.json file:

{
  "compileOnSave": false,
  "compilerOptions": {
    "baseUrl": "./",
    "outDir": "./dist/out-tsc",
    "forceConsistentCasingInFileNames": true,
    "strict": true,
    "strictNullChecks": false,
    "noImplicitOverride": true,
    "noPropertyAccessFromIndexSignature": true,
    "noImplicitReturns": true,
    "noFallthroughCasesInSwitch": true,
    "paths": {
      "*": [
        "node_modules/*"
      ]
    },
    "sourceMap": true,
    "declaration": false,
    "downlevelIteration": true,
    "experimentalDecorators": true,
    "moduleResolution": "node",
    "importHelpers": true,
    "target": "es2020",
    "module": "es2020",
    "lib": [
      "es6",
      "es2020",
      "dom"
    ]
  },
  "angularCompilerOptions": {
    "enableI18nLegacyMessageIdFormat": false,
    "strictInjectionParameters": true,
    "strictInputAccessModifiers": true,
    "strictTemplates": true
  }
}
0 Answers
Related