Skip to content

Unable to locate stylesheet  #27027

@EmreAras04

Description

@EmreAras04

Command

build

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

16

Description

Hello,

I have an Angular project in version 16 that I've just migrated to version 17.
My problem is during the build, in fact I have 2 warnings coming from the Verona(Template file) : assets/layout files

▲ [WARNING] Unable to locate stylesheet: C:\assets\layout\layout\preloading.css
▲ [WARNING] Unable to locate stylesheet: C:\assets\layout\styles\theme\theme-light\indigo\theme.css

these errors appeared during migration to Angular 17...

I was able to remove the warnings by using the webpack builder proposed on Angular 16 which is @angular-devkit/build-angular:browser and not the one used (recommended) on Angular 17: @angular-devkit/build-angular:application or browser-esbuild.

I checked the Angular configuration files, but I couldn't find a solution.

Do you have any idea where this problem might be coming from?

Relative & Absolute path ?

Minimal Reproduction

ng build when i building app, I get a warning but it doesn't affect my application on localhost:4200

Exception or Error

▲ [WARNING] Unable to locate stylesheet: C:\assets\layout\styles\layout\preloading.css


▲ [WARNING] Unable to locate stylesheet: C:\assets\layout\styles\theme\theme-light\indigo\theme.css

Your Environment

Visual Studio Code

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 17.1.1
Node: 20.11.0
Package Manager: npm 10.2.4
OS: win32 x64

Angular: undefined
...

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.1701.1 (cli-only)
@angular-devkit/core         17.1.1 (cli-only)
@angular-devkit/schematics   17.1.1 (cli-only)
@schematics/angular          17.1.1 (cli-only)

Anything else relevant?

All package in my JSOn file is update

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs: repro stepsWe cannot reproduce the issue with the information given

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions