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

版本不兼容问题 #81

Open
umi-soft opened this issue Aug 2, 2019 · 2 comments
Open

版本不兼容问题 #81

umi-soft opened this issue Aug 2, 2019 · 2 comments

Comments

@umi-soft
Copy link

umi-soft commented Aug 2, 2019

events.js:174
throw er; // Unhandled 'error' event
^
Error: node_modules/element-theme-chalk/src/avatar.scss
Error: Undefined variable: "$--avatar-font-color".
on line 9 of node_modules/element-theme-chalk/src/avatar.scss, in mixin @content
from line 74 of node_modules/element-theme-chalk/src/mixins/mixins.scss, in mixin b
from line 4 of node_modules/element-theme-chalk/src/avatar.scss

color: $--avatar-font-color;
产生上述错误,版本信息为:
"element-theme-chalk": "^2.11.1",
"element-ui": "2.9.1",
调整chalk版本,问题得到解决
"element-theme-chalk": "^2.9.2"

@philliphartin
Copy link

philliphartin commented Aug 13, 2019

I'm also having the same issue with:

"element-ui": "^2.11.1",
 "element-theme": "^2.0.1",
 "element-theme-chalk": "^2.11.1",
⠸ build element theme

events.js:174
      throw er; // Unhandled 'error' event
      ^
Error: node_modules/element-theme-chalk/src/avatar.scss
Error: Undefined variable: "$--avatar-font-color".
        on line 9 of node_modules/element-theme-chalk/src/avatar.scss, in mixin `@content`
        from line 74 of node_modules/element-theme-chalk/src/mixins/mixins.scss, in mixin `b`
        from line 4 of node_modules/element-theme-chalk/src/avatar.scss
>>   color: $--avatar-font-color;

   ---------^

Seems the issue is because of the addition of the Avatar component in ElementUI/theme-chalk@d1968d4

@sunyongjian
Copy link

sunyongjian commented May 20, 2020

element-variables.scss 这个文件里,把缺少的变量定义一下就行了。
具体定义的值是什么,可以看 element-theme-chalk, lib 中对应 css 文件的代码,找到报错的 css 属性和值。

楼上的报错信息看,是去 node_modules/element-theme-chalk/lib/avatar.css 下,找 color 的属性。
当然你也可以跳过,直接写 ‘default’ 之类的属性值。
比如:

$--avatar-font-color: 'unset';

问题出现的原因不确定,估计是 element-theme 的 bug.

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

3 participants