Running estilo render returns a type error
sandkoan opened this issue · comments
Govind Gnanakumar commented
My node version is 14.10.0 and npm version is 6.14.8. The other estilo commands, like estilo init
and estilo add-syntax
work fine.
This is the output when I run estilo render
:
Error:
TypeError: hexterm is not a function
at /usr/lib/node_modules/estilo/src/compile-palette.js:20:41
at Array.forEach (<anonymous>)
at module.exports (/usr/lib/node_modules/estilo/src/compile-palette.js:8:23)
at /usr/lib/node_modules/estilo/src/render-project.js:32:19
at Array.forEach (<anonymous>)
at module.exports (/usr/lib/node_modules/estilo/src/render-project.js:31:28)
at /usr/lib/node_modules/estilo/src/load-project.js:39:22
Tormod Fossum commented
It can seemingly be fixed by appending .default on the hexterm function calls in compile-colorscheme.js:
if (isHexColor(color)) {
return [color, hexterm.default(color)]
}
and compile-palette.js:
palette[c] = [props[0], props[1] || hexterm.default(props[0])]
At least on the "ts" branch.
Govind Gnanakumar commented
This seems to have fixed my problem. Thank you!