VSCode Angular 9 Auto-Import for Custom Libraries · Issue #37222 · microsoft/TypeScript (original) (raw)

TS Template added by @mjbvz

TypeScript Version: 3.8.3

Search Terms


I'm currently building an Angular 9 Library using VSCode (version 1.42.1 on MAC OS). I followed the Angular Tutorial on how to create libraries - https://angular.io/guide/creating-libraries.

I also added schematics to the angular package, I'm currently having problems when I add the Library to Angular Application using the ng add ~/projects/my-library-0.01.tgz --save command.

VSCode is unable to auto-import components or classes defined in this package.

Cannot find name 'MyService'.

If I manually add import { MyService } from 'my-library' this works fines.

Is there a reason why the auto-import is not working for custom angular libraries?