VSCode auto-import not working for clean angular project

Viewed 4785

Having a clean Angular 10 project with Typescript 3.9.7, some auto imports and suggestions are not working. For example, I begin to type FormsM... and it should appear FormsModule to autocomplete and auto import from @angular/forms, but this option does not appear. However, there are other options that do appear, for example: FormStyle (from @angular/common).

enter image description here

I already tried adding "typeRoots": [ "node_modules" ] to my tsconfig.json but didn't work. Is this a typescript problem or is it a vscode problem? This is killing my productivity. Please help.

I even installed a bunch of extensions but none seem to work for me. I have these enabled:

  • Visual Studio IntelliCode
  • TypeScript Toolbox
  • TypeScript Importer
  • TypeScript Hero
  • TSLint
  • Prettier
  • Javascript (ES6) code snippets
  • Angular Files
1 Answers
Related