Skip to content

版本不兼容问题 #81

Open
Open

Description

@umi-soft

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"

Activity

  1. philliphartin commented on Aug 13, 2019

    @philliphartin

    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

  2. sunyongjian commented on May 20, 2020

    @sunyongjian

    在 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions