question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Error - input.scss] Undefined variable: "$--input-clear-hover-color"

See original GitHub issue

Versions

element-theme: 2.0.1 element-ui: 2.0.7 element-theme-chalk: 2.0.7

Problem

When I run et -i, I get the file element-variables.scss. This file doesn’t contain the variable $--input-clear-hover-color. And when I run et, I get the following output:

$>et

\ build element theme

events.js:160
      throw er; // Unhandled 'error' event
      ^
Error: node_modules\element-theme-chalk\src\input.scss
Error: Undefined variable: "$--input-clear-hover-color".
        on line 19 of node_modules/element-theme-chalk/src/input.scss
>>       color: $--input-clear-hover-color;
   -------------^

    at Object.module.exports.renderSync (C:\Users\rvanrent080817\AppData\Local\Yarn\config\global\node_modules\node-sass\lib\index
.js:439:16)
    at DestroyableTransform._transform (C:\Users\rvanrent080817\AppData\Local\Yarn\config\global\node_modules\gulp-sass\index.js:1
57:36)
    at DestroyableTransform.Transform._read (C:\Users\rvanrent080817\AppData\Local\Yarn\config\global\node_modules\readable-stream
\lib\_stream_transform.js:182:10)
    at DestroyableTransform.Transform._write (C:\Users\rvanrent080817\AppData\Local\Yarn\config\global\node_modules\readable-strea
m\lib\_stream_transform.js:170:83)
    at doWrite (C:\Users\rvanrent080817\AppData\Local\Yarn\config\global\node_modules\readable-stream\lib\_stream_writable.js:406:
64)
    at writeOrBuffer (C:\Users\rvanrent080817\AppData\Local\Yarn\config\global\node_modules\readable-stream\lib\_stream_writable.j
s:395:5)
    at DestroyableTransform.Writable.write (C:\Users\rvanrent080817\AppData\Local\Yarn\config\global\node_modules\readable-stream\
lib\_stream_writable.js:322:11)
    at write (C:\Users\rvanrent080817\AppData\Local\Yarn\config\global\node_modules\gulp\node_modules\readable-stream\lib\_stream_
readable.js:623:24)
    at flow (C:\Users\rvanrent080817\AppData\Local\Yarn\config\global\node_modules\gulp\node_modules\readable-stream\lib\_stream_r
eadable.js:632:7)
    at DestroyableTransform.pipeOnReadable (C:\Users\rvanrent080817\AppData\Local\Yarn\config\global\node_modules\gulp\node_module
s\readable-stream\lib\_stream_readable.js:664:5)

How am I supposed to fix this?

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
Elfayercommented, Apr 12, 2018

@snakepoon I made some testing and it finally works. I am not sure why, can you try the following and tell me if it fixes it for you?

Previous posts not working?

Skip steps that do not concern your case.

  • Remove folder /node_modules
  • Remove folder /theme
  • Run npm i
  • Run npm i element-theme-chalk -D
  • Make sure your version of element-ui is the same as element-theme-chalk in your package.json
  • Rename your file element-variables.scss to _element-variables.scss (to keep your modifications)
  • Run et -i (to create a new element-variables.scss file)
  • Replace manually the new file variables to the ones you have in your old file
  • Run et
1reaction
snakepooncommented, Apr 10, 2018

@Elfayer I did as you suggest: Remove node_modules Run npm i Run et -i Run et But I still have missing variables while execute et. It should be the problem of file element-variables.scss. It was generated with missing variables by et -i. And I’m user below version: element-ui:2.3.3 element-theme:2.0.1 element-theme-chalk:2.3.3 And I still don’t know how to go over this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix an Undefined Variable Error in SCSS?
It is at the top of my scss/helpers/_variables.scss is at the top of the helpers directory, and the helpers directory is at the...
Read more >
undefined - JavaScript - MDN Web Docs - Mozilla
undefined is a property of the global object. That is, it is a variable in global scope. In all non-legacy browsers, undefined is...
Read more >
wallets - Sass error Undefined variable
I just started to set up my first wallet, and I got an an error I cant solve when I run npm start:...
Read more >
Calculations
It's the same syntax as the CSS calc() , but with the additional ability to use Sass variables and call Sass functions. This...
Read more >
Sass · Bootstrap v5.0
Utilize our source Sass files to take advantage of variables, maps, mixins, and functions to help you build faster and customize your project....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found