1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

Angular + Nx: Cannot resolve module aliases like @frontend/* even with correct tsconfig.paths

Discussão em 'Angular' iniciado por Zhad1k, Julho 26, 2025.

  1. Zhad1k

    Zhad1k Guest

    I'm working in an Nx monorepo with Angular, and I have module aliases set up in tsconfig.base.json like this:

    "paths": {
    "@frontend/*": ["apps/frontend/src/app/*"],
    "@backend/*": ["apps/backend/src/app/*"]
    }


    Despite this, I'm getting errors like: Cannot find module '@frontend/...' or its corresponding type declarations.

    I’ve checked that:

    The files do exist.

    The paths in tsconfig.base.json are correct.

    The imports match the alias exactly.

    I'm not missing tsconfig.json references in the apps/libs.

    I've restarted the IDE, cleared node_modules, and reinstalled.

    How can I fix this so the imports from @frontend/* work properly?

    Continue reading...

Compartilhe esta Página