-
Notifications
You must be signed in to change notification settings - Fork 12k
Can't resolve SCSS files in karma with "builderMode": "application" #29619
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Switching to |
This behavior is working as expected. By default, deprecation warnings in Sass are treated as fatal errors. However, you can opt out of this by configuring the "architect": {
"build": {
"builder": "@angular-devkit/build-angular:application",
"options": {
"outputHashing": "none",
"namedChunks": true,
"stylePreprocessorOptions": {
"sass": {
"futureDeprecations": ["color-functions"],
"fatalDeprecations": ["color-functions"],
"silenceDeprecations": ["1.77.0"]
}
}
}
}
} For more details, refer to the Sass docs: |
Well, this is definitely different from my original problem. Your code sample shows the configuration for the application builder, whilst my example is about running karma with the application builder. Furthermore, |
A feature request has been made to support this option in the Karma builder: #29185. In the end, it's due to the same underlying issue that using deprecated syntax will cause Sass to fail by default. |
Yes, that was the issue I was trying to find. We are also running Bootstrap. I assume the problem here then is that |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Command
test
Is this a regression?
The previous version in which this bug was not present was
No response
Description
Using a codebase with large amounts of older SCSS, code and configurations, I ran into some change detection mishaps in a lot of unittests that have been migrated to use signals. To avoid this, I tried to switch over the
"builderMode"
to"application"
to see if that might alleviate some of these errors. However, I didn't get that far, because as soon as I added that option, I got build errors inng test
where it wasn't able to resolve the location of SCSS files insrc/assets
(that are referred to in the stylesheets like so: `@import 'assets/scss/variables'.Minimal Reproduction
I have made a full reproduction at https://stackblitz.com/edit/stackblitz-starters-c6wauz2h?file=angular.json
The key thing here is that removing
"builderMode" in
angular.json` and the test builds and runs. Adding it and the error occurs.Exception or Error
Your Environment
Anything else relevant?
No response
The text was updated successfully, but these errors were encountered: