After a few rotations of upgrades absolute paths to styles stopped working (Angular 15-17)

Discussão em 'Angular' iniciado por Karina Koroleva, Abril 3, 2025.

  1. I have received an error during serve and build my angular project: [​IMG]

    Yesterday I tried to upgrade my angular version from 15 to 17 in another branch where received the same message. So I did a few kills/reinstallations of node-modules and package-lock. And now it is the same for my current branch. If I click on a file in an error (src/etc/etc) my ide will open the file without issues so they exist exacly where the path points.

    If I change all the paths to relative ones it will work, but why, even on a branch with no upgrades I receive this warning and how to fix it so I can use absolute path?

    Also strange fact is that, I receive only a few errors of this kind. Like 2 or 3 paths with this error at first. I fix them without killing serve process and it will pass at some point.

    Then, if I stop it and retry serve, I will receieve another portion of incorrect paths.

    Thanks in advance.

    My tsconfig baseUrl is

    "baseUrl": "src"


    My stylePreprocessorOptions are:

    "stylePreprocessorOptions": {
    "includePaths": ["src/styles"]
    }

    Continue reading...

Compartilhe esta Página