material-components-web-codelabs
material-components-web-codelabs copied to clipboard
[codelab] No 'theme-color' stylesheet ERROR
Am getting this error when trying to do Lesson 2 ? i checked in the
'material-design-tutorial\material-components-web-codelabs\mdc-102\starter\node_modules@material\theme' folder and there is (as stated in the error) no 'theme-color' stylesheet
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 13:1 @import stdin 2:9 root stylesheet in C:\Repos\material-design-tutorial\material-components-web-codelabs\mdc-102\starter\node_modules@material\list_variables.scss (line 22, column 1) @ multi (webpack)-dev-server/client?http://localhost:8080 ./home.scss
Caused by adding the following into home.scss: @import "@material/drawer/mdc-drawer"; @import "@material/list/mdc-list";
Any idea how to FIX so i can carry on with the lesson?
OK - just noticed the solution. The tutorial needs updated
Both component should be installed in version 6.0.0.0:
npm install @material/drawer@^6.0.0 npm install @material/list@^6.0.0
Had same issue. Thanks @djax-dj for posting the fix!
lifesaver. life was already desperate, for hours drooling for a fix, but then there came @djax-dj also every time you get more errors of the same time just add @^6.0.0 every time you need to do an install like npm install @material/image-list@^6.0.0