Skip to content

VSCode Angular 9 Auto-Import for Custom Libraries #37222

Description

TS Template added by Matt Bierner (@mjbvz)

TypeScript Version: 3.8.3

Search Terms

  • angular

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs InvestigationThis issue needs a team member to investigate its status.

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions