Typescript autocomplete/autoimport not working in Angular project subfolders

546 Views Asked by At

I have an Angular + NodeJS project with the follow structure:

/node_modules
/tsconfig.json
/tsconfig.app.json
/tsconfig.spec.json
/package.json
/src/
   client/
      main.ts
   server/
      node_modules
      tsconfig.json
      package.json
      app.ts

But Autocomplete / Autoimport is not working in any file under server/ or any other subfolder created in the same folder than the Angular project.

How can I solve that?


I tried include the server/ in the root tsconfig.json but nothing, also tried: typescript auto imports not working macos which is not related to Angular.

1

There are 1 best solutions below

0
On

The types ignored where in server/node_modules but fixed adding "typeRoots": ["node_modules"] in server/tsconfig.json.