I'm trying to upgrade my Angular projects from 12 to 13 and running into an issue that I cannot fix since two days of work.
My applications are default Angular Material apps with some functionality like a grocery list app.
To insert items I use a formula with some fields which can be submitted. (MatDialog) I have outsourced this formula into my own angular library to be a little bit more generic and reusable.
Now, after upgrading the library project and trying to link the resulting build (from new Ivy) into my app I'm getting the error:
SassError: Can't find stylesheet to import.
@import '@my/form-lib/theme';
The stylesheet which is meant to be unknown comes from the library and provides the default theming access to this library but I cannot determine why this should happen.
I also recognized, that the use of Angular Material
now doesn't need the tilde ~ anymore.
@use '**~**@angular/material' as mat;
I have tried to remove all tilde ~ but the error still exists.
I also have tried to reset @angluar/cli
to 13.0.0 which is described as a solution here.
But this doesn't work for me.
Does anyone know a solution to try out?
@use
but you use@import
? Try changing to@use
– Xenolith@use '@my/form-lib/theme as form-lib; '
– Bothersome@use '@my/form-lib/theme
maybe? – Xenolith@my/form-lib/theme
come from, is it in your project? What happens if you include the path to@my
inangular.json
->stylePreprocessorOptions.includePaths
? – Vasiliung serve
. If I build and then serve it externally, it's fine. – Poignant