Skip to content

Angular CLI is giving error - Can't resolve '/assets/***sharedfonts/open-sans-v15-latin-300.woff2' after updated to Angular 10 #18043

Closed
@ErVishalM

Description

@ErVishalM

Hi,

I just updated to Angular 10 and before this i was using Angular 9.1 and this was working fine in Angular 9.1 now angular cli is throwing error that
Can't resolve '/assets/***sharedfonts/open-sans-v15-latin-300.woff2'
image

If i remove the ~ then it is working fine on local server but it is not replacing relative path in styles.d17173f9650483347d45.css production css file.

So because of that i am getting error on production server if i remove ~
image

Previous Angular 9.1 styles.css production file angular cli was automatically adding my href (MyProject) in path
image
Angular 10 styles.css production file angular cli not adding my href (MyProject) in path
image

Adding this ~ before /assets/ i got this answer from here
Please help me what am i missing? Is there something i need to do?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions