abe33 / abe33/atom-pigments

Uncaught TypeError: hexToRGB is not a function

未關閉 適合新手
#370 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
bug
主要語言
CoffeeScript
星號
518
分支
70
PR 合併指標
30 天內沒有已合併 PR

描述

This is from a fresh install of Pigments on the latest stable version of Atom. I'm not sure if it's related to this error, but nothing is being colored as well.

### Steps to Reproduce

1. Install atom-pigments
2. Run "Pigments: Reload", or change "Sass Shade And Tint Implementation" setting (to bourbon or compass)

**Atom**: 1.22.1 x64
**Electron**: 1.6.15
**OS**: Ubuntu 16.04.3
**Thrown From**: [pigments](https://github.com/abe33/atom-pigments) package 0.40.2

### Stack Trace

Uncaught TypeError: hexToRGB is not a function

```
At /home/steve/.atom/packages/pigments/lib/color.coffee:163

TypeError: hexToRGB is not a function
at Color.set (/packages/pigments/lib/color.coffee:163:31)
at /packages/pigments/lib/color-expressions.coffee:50:3)
at ColorExpression.module.exports.ColorExpression.parse (/packages/pigments/lib/color-expression.coffee:51:13)
at ColorParser.module.exports.ColorParser.parse (/packages/pigments/lib/color-parser.coffee:11:17)
at ColorContext.module.exports.ColorContext.readColor (/packages/pigments/lib/color-context.coffee:181:22)
at VariablesCollection.module.exports.VariablesCollection.evaluateVariableColor (/packages/pigments/lib/variables-collection.coffee:325:21)
at /packages/pigments/lib/variables-collection.coffee:253:10
at VariablesCollection.module.exports.VariablesCollection.evaluateVariables (/packages/pigments/lib/variables-collection.coffee:267:5)
at /packages/pigments/lib/color-project.coffee:98:18
at Function.module.exports.Emitter.simpleDispatch (/packages/pigments/node_modules/event-kit/lib/emitter.js:25:14)
at Emitter.module.exports.Emitter.emit (/packages/pigments/node_modules/event-kit/lib/emitter.js:141:28)
at /packages/pigments/lib/color-project.coffee:84:41
at /usr/share/atom/resources/app/src/config.js:676:22
at /usr/share/atom/resources/app/src/config.js:693:26
at Function.module.exports.Emitter.simpleDispatch (/usr/share/atom/resources/app/node_modules/event-kit/lib/emitter.js:25:20)
at Emitter.module.exports.Emitter.emit (/usr/share/atom/resources/app/node_modules/event-kit/lib/emitter.js:141:34)
at Config.module.exports.Config.emitChangeEvent (/usr/share/atom/resources/app/src/config.js:884:35)
at Config.module.exports.Config.setRawValue (/usr/share/atom/resources/app/src/config.js:670:25)
at Config.module.exports.Config.set (/usr/share/atom/resources/app/src/config.js:248:20)
at SettingsPanel.set (/usr/share/atom/resources/app/node_modules/settings-view/lib/settings-panel.js:237:27)
at HTMLSelectElement.changeHandler (/usr/share/atom/resources/app/node_modules/settings-view/lib/settings-panel.js:251:24)
```

### Commands

```
2x -8:25.6.0 settings-view:open (input.hidden-input)
3x -6:21.3.0 core:confirm (input.hidden-input)
-5:14.3.0 core:backspace (input.hidden-input)
2x -5:05.6.0 core:save (input.hidden-input)
-4:14 core:move-up (input.hidden-input)
-4:13.1.0 core:move-down (input.hidden-input)
-4:12.9.0 editor:move-to-end-of-screen-line (input.hidden-input)
-3:32.3.0 core:save (input.hidden-input)
-3:02.1.0 editor:delete-to-previous-word-boundary (input.hidden-input)
3x -3:00.8.0 core:save (input.hidden-input)
4x -1:54.4.0 core:backspace (input.hidden-input)
2x -1:53.6.0 editor:delete-to-previous-word-boundary (input.hidden-input)
-0:30.2.0 core:select-all (input.hidden-input)
-0:29.2.0 core:backspace (input.hidden-input)
```

### Non-Core Packages

```
atom-beautify 0.30.5
language-gitignore 0.3.0
language-haml 0.25.2
language-pug 0.0.21
language-vue 0.23.1
language-vue-component 0.5.0
markdown-preview-plus 2.4.16
minimap 4.29.7
pigments 0.40.2
pure-syntax 0.3.0
```

貢獻指南

開啟貢獻指南

研究方向

The error occurs in lib/color.coffee at line 163 where hexToRGB is called but not defined. Start by examining the color.coffee file to see if hexToRGB is imported or defined elsewhere. Check the surrounding code for missing function definitions or import statements. Run the package in Atom's developer mode to reproduce the error and verify the fix.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
coffeescript, javascript
領域
desktop, devtools
Issue 類型
缺陷
難度
2/5
預估耗時
1-3 小時
活躍度
停滯
描述清晰度
描述清楚
新手友好度
65/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。