abe33 / abe33/atom-pigments

Uncaught ReferenceError: __CUSTOM_HTML_ELEMENTS_CLASSES__ is not defined

Đang mở
#480 4 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
CoffeeScript
Star
518
Fork
70
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

[Enter steps to reproduce:]

1. I have my webroot as my open project with between 2-3k files.
2. I open Command Palette, search `pigm` and select `Pigments: Show Palette`.
3. A new tab opens labelled Palette. When I try to swap to/close it, it takes a bit then throws this error.
4. When I try to click "Create issue …" I get this issue: https://github.com/atom/atom/issues/23662
5. Left Clicking on the word Palette on the new tabs opens a new tab, labeled Palette. Clicking the tab background or the close button does nothing.
6. Colors are rendering mostly properly.
7. The HSLA of a var that is just comma separated numbers isn't highlighting right but THAT should maybe be another issue (?):
```css
:root {
--background-hsl: 231, 15%, 18%;
--main-background: hsla(var(--background-hsl), 1);
}
```

**Atom**: 1.59.0 x64
**Electron**: 9.4.4
**OS**: macOS 12.2.1
**Thrown From**: [pigments](ssh://git@github.com/abe33/atom-pigments) package 0.40.6

### Stack Trace

Uncaught ReferenceError: __CUSTOM_HTML_ELEMENTS_CLASSES__ is not defined

```
At /Users/user/.atom/packages/pigments/node_modules/atom-utils/lib/register-or-update-element.js:55

ReferenceError: __CUSTOM_HTML_ELEMENTS_CLASSES__ is not defined
at module.exports (/packages/pigments/node_modules/atom-utils/lib/register-or-update-element.js:55:5)
at /packages/pigments/lib/palette-element.coffee:237:1)
at /packages/pigments/lib/palette-element.coffee:1:1)
at /packages/pigments/lib/palette-element.coffee:1:1)
at Module.get_Module._compile (/Applications/Atom.app/Contents/Resources/app/static/:11:149891)
at Object.value [as .coffee] (/Applications/Atom.app/Contents/Resources/app/static/:11:153485)
at Module.load (internal/modules/cjs/loader.js:815:32)
at Module._load (internal/modules/cjs/loader.js:727:14)
at Function.Module._load (electron/js2c/asar.js:769:28)
at Module.require (/app.asar/static/index.js:72:46)
at require (/Applications/Atom.app/Contents/Resources/app/static/:11:149207)
at Object.pigmentsViewProvider (/packages/pigments/lib/pigments.coffee:206:25)
at Object.createView (/Applications/Atom.app/Contents/Resources/app/static/:11:3418494)
at ViewRegistry.createView (/Applications/Atom.app/Contents/Resources/app/static/:11:327908)
at ViewRegistry.getView (/Applications/Atom.app/Contents/Resources/app/static/:11:327373)
at HTMLElement.getActiveView (/app.asar/src/pane-element.js:206:23)
at HTMLElement.handleFocus (/app.asar/src/pane-element.js:44:25)
at HTMLElement.activated (/app.asar/src/pane-element.js:115:12)
at Function.simpleDispatch (/Applications/Atom.app/Contents/Resources/app/static/:11:1187446)
at Emitter.emit (/Applications/Atom.app/Contents/Resources/app/static/:11:1188887)
at Pane.activate (/Applications/Atom.app/Contents/Resources/app/static/:11:467610)
at NotificationElement.removeNotificationAfterTimeout (/Applications/Atom.app/Contents/Resources/app/static/:11:885770)
at NotificationElement.removeNotification (/Applications/Atom.app/Contents/Resources/app/static/:11:884656)
at NotificationElement.handleRemoveNotificationClick (/Applications/Atom.app/Contents/Resources/app/static/:11:884773)
at HTMLDivElement. (/Applications/Atom.app/Contents/Resources/app/static/:11:881090)
```

### Commands

```
-7:03.6.0 intentions:highlight (input.hidden-input)
-6:59.6.0 command-palette:toggle (input.hidden-input)
-6:57.9.0 core:backspace (input.hidden-input)
-6:54.8.0 pigments:show-palette (input.hidden-input)
-1:37.9.0 auto-indent:apply (button.btn.icon.enablement.icon-playback-pause)
-1:35.2.0 window:toggle-dev-tools (button.btn.icon.enablement.icon-playback-pause)
```

### Non-Core Packages

```
atom-clock 0.1.18
atom-ctags 5.1.2
atom-ide-ui 0.13.0
atom-sass 0.4.0
auto-indent 0.5.0
browser-refresh-on-save 1.0.0
busy-signal 2.0.1
color-dict 0.7.0
color-picker 2.3.0
ctags-status 1.4.0
dracula-syntax 3.0.2
dracula-ui 0.6.0
emoji-code 0.11.1
file-type-icons 1.3.4
file-types 1.0.1
fix-indent-on-paste 0.1.1
fold-functions 0.11.0
git-control 0.9.0
git-diff-details 1.4.0
hex-to-rgba 2.0.0
intentions 2.1.1
last-cursor-position 1.2.0
linter 3.4.0
linter-csslint 2.0.6
merge-conflicts 1.4.5
minimap 4.40.0
minimap-pigments 0.2.2
open-in-github-app 0.2.6
pigments 0.40.6
prettier-atom 0.60.1
remote-ftp 2.2.4
set-syntax 0.4.0
split-diff 1.6.1
tag 0.5.0
teletype 0.13.4
text-manipulation 0.6.0
tree-view-git-branch 0.1.2
tree-view-git-status 1.5.3
url-encode 0.5.0
var-that-color 0.4.1
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Lỗi bắt nguồn từ /node_modules/atom-utils/lib/register-or-update-element.js tại dòng 55, nơi __CUSTOM_HTML_ELEMENTS_CLASSES__ được tham chiếu nhưng chưa được định nghĩa. Hãy kiểm tra tệp đó và tệp palette-element.coffee để hiểu cách các phần tử tùy chỉnh được đăng ký. Kiểm tra xem biến này có được khai báo hoặc import ở nơi khác hay không, đồng thời đảm bảo biến được khởi tạo đúng cách trước khi sử dụng. Việc chạy các bài kiểm thử của package hoặc tái hiện lỗi trong môi trường phát triển sẽ giúp xác minh bản sửa lỗi.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
javascript
Lĩnh vực
desktop, devtools
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Đặc tả rõ ràng
Mức phù hợp với người mới
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.