Invalid style specified! Choose one of primary, accent, background, ........
See original GitHub issueProblem description
main.scss :
//$mdc-theme-primary: #9c27b0;
//$mdc-theme-accent: #76ff03;
//$mdc-theme-background: #fff;
@import "material-components-web/material-components-web";
@import "./_color";
....
Error when add @import "material-components-web/material-components-web";
ERROR in ./node_modules/css-loader!./node_modules/resolve-url-loader!./node_modu
les/sass-loader/lib/loader.js?{"sourceMap":true,"includePaths":["E://Project//al
lproject_git//react-boilerplate//node_modules"]}!./app/styles/main.scss
Module build failed:
undefined
^
Invalid style specified! Choose one of primary, accent, background, text-p
rimary-on-primary, text-secondary-on-primary, text-hint-on-primary, text-disable
d-on-primary, text-icon-on-primary, text-primary-on-accent, text-secondary-on-ac
cent, text-hint-on-accent, text-disabled-on-accent, text-icon-on-accent, text-pr
imary-on-background, text-secondary-on-background, text-hint-on-background, text
-disabled-on-background, text-icon-on-background, text-primary-on-light, text-se
condary-on-light, text-hint-on-light, text-disabled-on-light, text-icon-on-light
, text-primary-on-dark, text-secondary-on-dark, text-hint-on-dark, text-disabled
-on-dark, text-icon-on-dark
in E:\Project\allproject_git\react-boilerplate\node_modules\@material\them
e\_mixins.scss (line 26, column 12)
@ ./app/styles/main.scss 4:14-179 18:2-22:4 19:20-185
@ ./app/containers/App/index.js
@ ./app/app.js
@ multi eventsource-polyfill webpack-hot-middleware/client?reload=true ./app/ap
p.js
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:11 (1 by maintainers)
Top Results From Across the Web
accent-color - CSS: Cascading Style Sheets - MDN Web Docs
Represents a UA-chosen color, which should match the accent color of ... and <color> values are computed as defined for the color property....
Read more >How to get primary or accent color of currently applied theme ...
My goal was to be able to style non-Material elements (such as standard DIVs, SPANs, etc) with different colors depending on which Material ......
Read more >accent-color - CSS-Tricks
The accent-color property in CSS is capable of re-tinting the accented color of form controls provided by the browser's default styles with ...
Read more >The color system - Material Design
Having a secondary color is optional, and should be applied sparingly to accent select parts of your UI. If you don't have a...
Read more >Theming your own components - Angular Material
This function returns a Sass map containing the theme's primary, accent, ... Each mixin emits all color and typography styles for that component, ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@pvamshi Sorry, I just misunderstand you (looking too quickly …)
The full situation is:
material-components-web 0.17.0
installed, got this errornpm update material-components-web
(But I fogot add--save
, so package.json not update) , still errorpackage.json
fix vertion to0.19.0
, and install@material/theme
, still this error.Now I uninstall
@material/theme
, it go to normal.I hadn’t have that when you ask me, then I tried to install it see what would happen , but still same error. At first, I think you are asking me delete
node_module
, updatematerial-components-web
to lastest and install@material/theme
…