Reputation: 93
Got below error while updating angular V16 to V17.
[ERROR] Could not resolve "open-sans/latin_700.woff2" [plugin angular-css-resource]
<stdin>:581:11:
581 │ src: url("open-sans/latin_700.woff2") format("woff2");
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can mark the path "open-sans/latin_700.woff2" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle. Preprocessor stylesheets may not show the exact file location of the error.
✖ Compiling with Angular sources in Ivy partial compilation mode.
Upvotes: 5
Views: 1326
Reputation: 323
I encountered a similar error when I tried to import external fonts. Everything worked with angular 16 and stopped workin on v17. What helped was changing the relative path to an absolute path.
Before:
$icomoon-font-path: "../../fonts/icons";
After:
$icomoon-font-path: "apps/my-project/src/assets/fonts/icons";
Upvotes: 2