Skip to content
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

[codelab] "Can't find stylesheet to import" error in ./home.scss #306

Open
Harissa opened this issue Aug 31, 2021 · 2 comments
Open

[codelab] "Can't find stylesheet to import" error in ./home.scss #306

Harissa opened this issue Aug 31, 2021 · 2 comments

Comments

@Harissa
Copy link

Harissa commented Aug 31, 2021

When I follow the instructions for this page. I get the build error:
ERROR in ./home.scss
Module build failed:
undefined
^
Can't find stylesheet to import.

22 │ @use '@material/theme/theme-color';
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

node_modules@material\list_variables.scss 22:1 @forward
node_modules@material\drawer\mdc-drawer.import.scss 12:1 @import
stdin 2:9 root stylesheet
in D:\current projects\Reciepts\MaterialTutorial\mdc-102\starter\node_modules@material\list_variables.scss (line 22, column 1)
@ multi (webpack)-dev-server/client?http://localhost:8080 ./home.scss

This only appears in the "starter" folder and not the "complete" folder. From what I can see the error seems to be because the starter project requires me to install the @material/list package whereas the complete project already has it installed. The complete project uses list package version 6 which works without errors, however the latest version of the list package is version 12 which creates the error shown.
In the short term, it would be good to have a work around because this means I can't go any further with the tutorial. This is the third npm package error that I've had with the tutorial so far, but I managed to solve the others. So in the longer term I would suggest you consider moving away from the npm type solutions as they create this type of dependency hell.

@eris8x6
Copy link

eris8x6 commented Sep 26, 2021

I had this problem, too. The solution is in issue #232:

In the @import, change "@material/ripple/mixins" to "@material/ripple/mdc-ripple"

@Harissa
Copy link
Author

Harissa commented Sep 27, 2021

Excellent! Thanks very much @eris8x6 that's the best kind of comment, the type which contains a fix. Much appreciated I'll give it go and see how I get on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants