material-components-web-codelabs icon indicating copy to clipboard operation
material-components-web-codelabs copied to clipboard

[codelab] No 'theme-color' stylesheet ERROR

Open djax-dj opened this issue 4 years ago • 3 comments

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?

djax-dj avatar Dec 17 '20 11:12 djax-dj

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

djax-dj avatar Dec 17 '20 14:12 djax-dj

Had same issue. Thanks @djax-dj for posting the fix!

aaronkai avatar Mar 18 '21 14:03 aaronkai

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

equatorlounge avatar Apr 08 '21 21:04 equatorlounge