-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
Can't find stylesheet to import: @use '~@angular/material' as mat; #23889
Comments
You should change the |
Wasn't set automatically via The current build literally warns a million times
|
I haven't seen that warning before, but it seems like it's coming from a Webpack loader, rather than Sass. |
@angelaki From what version did you run |
Yeah, it was already - guess that's the problem. Do you want me to simulate a clean update?
Grüße
Tristan Sprößer
…________________________________
From: Paul Gschwendtner ***@***.***>
Sent: Thursday, November 4, 2021 12:32:17 PM
To: angular/components ***@***.***>
Cc: Tristan Sprößer ***@***.***>; Mention ***@***.***>
Subject: Re: [angular/components] Can't find stylesheet to import: @use ***@***.***/material' as mat; (Issue #23889)
@angelaki<https://github.com/angelaki> From what version did you run ng update? was your project already on a v13 next or RC release?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#23889 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AJGSUBJLSZXQPANUBTY74V3UKJVMDANCNFSM5HK3TB7Q>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
I updated through |
Not necessarily needed. We have an integration test that runs The charset warnings are surprising and I'm unsure if this is something caused on our end? are there any signs that made you think this is caused by Angular Material? happy to look more into this. |
Have the same issue after updated my angular cli with material. An issue as been raised here : angular/angular-cli#22097 and here : angular/angular-cli#22098 |
Thanks @Kralone, let's track this with the CLI. it seems like there is even an fix from the CLI side for that. Closing because:
|
@devversion I have rerun the migration but it just nooped |
@hheexx when you ran |
@devversion nope, latest patch od 12.x |
that's interesting. We have an integration test for this, so I'm surprised. The original poster of this issue was on a v13 next release already, so that explains this scenario. If you have more details, a new issue would be appreciated. If others also run into this, and are not on v13 when running ng update, please also submit an issue. it looks like we haven't gotten any other reports so far. I will try to re-check the migration again in our docs app v12. |
Just re-tested, the migration ran as expected on the
As said, if anybody faces an issue where |
If anybody else reports the problem I will create the issue. Thanks! |
I had the same issue after migration from 12 to 13 ver: Build at: 2021-11-07T06:12:19.257Z - Hash: 238020893e14045d - Time: 327ms ./src/styles.scss.webpack[javascript/auto]!=!./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].rules[0].oneOf[1].use[1]!./node_modules/@angular-devkit/build-angular/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[ ./src/styles.scss - Error: Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js): Generated code for D:\Projects\SP\node_modules\css-loader\dist\cjs.js??ruleSet[1].rules[4].rules[0].oneOf[1].use[1]!D:\Projects\SP\node_modules@angular-devkit\build-angular\node_modules\postcss-loader\dist\cjs.js??ruleSet[1].rules[ It was solved by deleting ' ~ ' but my linter didn't like it) |
Without tilda sign works but stylint error occuring.
|
I no longer saw this issue once i added the following to angular.json
|
This is working! Thank you |
Ok, but I've got a large mono repo...should I include this:
to all my projects?I've got a material theme as a library included in all my projects. It doesn't feel it makes sense to remember I need to add the code above everytime I create a new project just because the ~has been deprecated |
It will likely be added to the script for upgrade and/or new project script when adding @angular/material. So, there is a need for this to be added until then if you are looking to use angular/material 13.
…________________________________
From: richardsengers ***@***.***>
Sent: Tuesday, December 7, 2021 8:53 AM
To: angular/components ***@***.***>
Cc: Edwin Cruz ***@***.***>; Comment ***@***.***>
Subject: Re: [angular/components] Can't find stylesheet to import: @use ***@***.***/material' as mat; (Issue #23889)
Ok, but I've got a large mono repo...should I include this:
"stylePreprocessorOptions": {
"includePaths": [
"node_modules",
]
to all my projects?I've got a material theme as a library included in all my projects. It doesn't feel it makes sense to remember I need to add the code above everytime I create a new project just because the ~has been deprecated
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#23889 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AGN4D7UQPCSWGMKTEZ5PMWDUPYGWBANCNFSM5HK3TB7Q>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Had this problem with monorepo + yarn workspaces. All deps from angular package hoisted to the project root, except
Deleting this line ( |
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. |
Using the latest Angular Material version (13.0.0) the first line of my theme.scss throws an error:
I've checked the
next-versions
: it was working with13.0.0-next.7
and stopped working from13.0.0-next.8
on.The text was updated successfully, but these errors were encountered: