Linking local library into Angular 5 Project

Discussão em 'Angular' iniciado por gmemario, Janeiro 3, 2025.

  1. gmemario

    gmemario Guest

    What i want is to have a library locally that when i change it those changes are reflected in the project that is using the library.

    i have check out this library here in my local machine: https://github.com/manfredsteyer/angular-oauth2-oidc

    So what i'm doing right now, is that i go to the library directory and then npm link

    And then get in my project directory and do

    npm link angular-oauth2-oidc

    The library folder appears inside my node_modules folder but i can't manage to use it, since when i start the app ng serve it says:

    Cannot find module 'angular-oauth2-oidc'

    I'm importing like this:

    import { OAuthModule } from 'angular-oauth2-oidc';

    I've tried to add the the path under the compilerOptions of the tsconfig.json file but haven't been sucessful.

    Any ideas on what i'm missing here? I've tried several suggestions i've found on angular github issues but none solved my problem.

    Thanks in advance

    Continue reading...

Compartilhe esta Página