#1324·bootswatch

Compiler can't work with google font link (material theme)

Author: MelBouCreated Feb 6, 2025Updated Mar 12, 2026

Hi, I upgraded my angular project to version 19. I upgraded bootstrap and bootswatch to version 5.3.3 as well. Since then, I can't compile my project, I always get this error message :

`X [ERROR] Could not resolve "../../../node_modules/bootswatch/dist/materia||file:https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap"

    src/assets/styles/styles.scss:7:12:
      7 │ @import url("../../../node_modules/bootswatch/dist/materia||file:ht...`

If I change _bootswatch.scss code from :

`// Variables

$web-font-path: "https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap" !default;
@if $web-font-path {
  @import url("#{$web-font-path}");
}`

to

`// Variables

$web-font-path: "https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap" !default;
@if $web-font-path {
  @import url("https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap");
}`

the problem is solved.

Am I missing something here ? Thanks for your help !