Open guidolarosa opened 7 years ago
Hi @guidolarosa,
It's definitely a bug, but I hardly see how it could get to this point, it looks like either on file is missing (the color context one) or the module cache gets somehow corrupted.
Have you tried completely removing the package directory then reinstall it?
Hi! I removed the package directory, I reinstalled it and now it shows me this error when I reload pigments via the Command Palette. I think it has something to do with the fact that Atom updated a couple days ago, but I'm not sure.
The following message is displayed by Atom:
TypeError: ColorContext is not a constructor
at VariablesCollection.module.exports.VariablesCollection.getContext (~/.atom/packages/pigments/lib/variables-collection.coffee:240:9)
at VariablesCollection.module.exports.VariablesCollection.evaluateVariableColor (~/.atom/packages/pigments/lib/variables-collection.coffee:324:16)
at VariablesCollection.module.exports.VariablesCollection.createVariable (~/.atom/packages/pigments/lib/variables-collection.coffee:315:6)
at VariablesCollection.module.exports.VariablesCollection.add (~/.atom/packages/pigments/lib/variables-collection.coffee:173:10)
at VariablesCollection.module.exports.VariablesCollection.addMany (~/.atom/packages/pigments/lib/variables-collection.coffee:179:14)
at VariablesCollection.module.exports.VariablesCollection.updatePathCollection (~/.atom/packages/pigments/lib/variables-collection.coffee:144:16)
at VariablesCollection.module.exports.VariablesCollection.updateCollection (~/.atom/packages/pigments/lib/variables-collection.coffee:111:40)
at ~/.atom/packages/pigments/lib/color-project.coffee:236:18`
Thanks for the response!
Greetings,
I have the same problem having this spec:
Atom Version: 1.11.2 Electron Version: 1.4.4-1 System: Arch Linux 64 bits Pigments Package: v0.38.0
This bug didn't happen with Atom 1.7.3 and pigments v0.37.0. When installed, the pigments doesn't show on the Atom Package Menu.
Same issues here on macOS Sierra with atom 1.12.1 and pigments 0.38.0
.
EDIT: re-installing by removing the package folder manually fixed this for me. It also installed 0.37.0
instead afterwards.
I'm running Atom 1.13.0-beta1
with Pigments 0.38.0
on Linux 4.4.0 (Ubuntu 16.04), and I don't have this problem. Seems that an older version of Atom is the problem?
@C-Bouthoorn I'll try installing the beta version of Atom and I come back to you.
@C-Bouthoorn Hey! I tried running the Beta and it still doesn't work after reinstalling it. Atom displays the same issue "ColorContext is not a constructor". Could be a problem of my configuration?
Thanks.
It might be that something went wrong while installing pigments. Could you try re-installing (Also check the .apm
folder for leftover pigments files)
@C-Bouthoorn Yeah i tried installing it through the UI and with the console with apm, several times, but still doesn't work. Hope you can find a solution soon.
Bye!
@guidolarosa Have you tried installing version 0.37 from the console using apm install pigments@0.37.0
?
@abe33 well i tried it just now and still it doesn' work. I tried it on Atom Beta and Atom, none of them work. When I reload pigments it still shows this error message:
Atom Version: 1.13.0-beta4 Electron Version: 1.3.9 System: Mac OS X 10.10 Thrown From: pigments package, v0.38.0
Uncaught TypeError: ColorContext is not a constructor
At /Users/GuidoLaRosa/.atom/packages/pigments/lib/variables-collection.coffee:240
TypeError: ColorContext is not a constructor
at VariablesCollection.module.exports.VariablesCollection.getContext (/Users/GuidoLaRosa/.atom/packages/pigments/lib/variables-collection.coffee:240:9)
at ColorProject.module.exports.ColorProject.getContext (/Users/GuidoLaRosa/.atom/packages/pigments/lib/color-project.coffee:425:29)
at ColorProject.module.exports.ColorProject.findAllColors (/Users/GuidoLaRosa/.atom/packages/pigments/lib/color-project.coffee:246:17)
at /Users/GuidoLaRosa/.atom/packages/pigments/lib/pigments.coffee:93:37
at Workspace.module.exports.Workspace.openURIInPane (/Users/GuidoLaRosa/Downloads/Atom Beta.app/Contents/Resources/app.asar/src/workspace.js:501:22)
at Object.findColors (/Users/GuidoLaRosa/.atom/packages/pigments/lib/pigments.coffee:238:20)
at atom-workspace.atom.commands.add.pigments:find-colors (/Users/GuidoLaRosa/.atom/packages/pigments/lib/pigments.coffee:24:35)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Users/GuidoLaRosa/Downloads/Atom Beta.app/Contents/Resources/app.asar/src/command-registry.js:259:29)
at /Users/GuidoLaRosa/Downloads/Atom Beta.app/Contents/Resources/app.asar/src/command-registry.js:3:59
at CommandPaletteView.module.exports.CommandPaletteView.confirmed (/Users/GuidoLaRosa/Downloads/Atom Beta.app/Contents/Resources/app.asar/node_modules/command-palette/lib/command-palette-view.js:210:32)
at CommandPaletteView.module.exports.SelectListView.confirmSelection (/Users/GuidoLaRosa/Downloads/Atom Beta.app/Contents/Resources/app.asar/node_modules/atom-space-pen-views/lib/select-list-view.js:338:21)
at space-pen-li.<anonymous> (/Users/GuidoLaRosa/Downloads/Atom Beta.app/Contents/Resources/app.asar/node_modules/atom-space-pen-views/lib/select-list-view.js:139:19)
at HTMLOListElement.dispatch (/Users/GuidoLaRosa/Downloads/Atom Beta.app/Contents/Resources/app.asar/node_modules/jquery/dist/jquery.js:4435:9)
at HTMLOListElement.elemData.handle (/Users/GuidoLaRosa/Downloads/Atom Beta.app/Contents/Resources/app.asar/node_modules/jquery/dist/jquery.js:4121:28)
-1:33.6.0 editor:newline (input.hidden-input)
-1:32.4.0 core:backspace (input.hidden-input)
-1:26.5.0 command-palette:toggle (input.hidden-input)
-1:22.9.0 core:move-down (input.hidden-input)
-1:22.5.0 core:confirm (input.hidden-input)
-1:22.5.0 pigments:reload (input.hidden-input)
-1:11.3.0 core:select-all (atom-notification.error.icon.icon-flame.native-key-bindings.has-detail.has-close.has-stack)
-1:09.9.0 core:copy (atom-notification.error.icon.icon-flame.native-key-bindings.has-detail.has-close.has-stack)
-0:04.7.0 command-palette:toggle (input.hidden-input)
-0:00.4.0 pigments:find-colors (input.hidden-input)
{
"core": {
"disabledPackages": [
"autocomplete-html",
"dev-live-reload",
"language-c",
"language-csharp",
"autocomplete-css",
"preview-plus",
"language-go",
"language-java",
"language-less",
"language-make",
"language-objective-c",
"language-php",
"language-python",
"language-ruby",
"language-ruby-on-rails",
"language-sass",
"language-toml",
"metrics",
"webbox-color",
"autocomplete-atom-api",
"autocomplete-snippets"
],
"ignoredNames": [
"*.ds"
],
"telemetryConsent": "limited",
"themes": [
"one-dark-ui",
"gaia-dark-syntax"
]
},
"pigments": {
"delayBeforeScan": 200,
"extendAutocompleteToColorValue": true,
"extendedSearchNames": [
"**/*.styl"
],
"groupPaletteColors": "by file",
"markerType": "background",
"sortPaletteColors": "by color"
}
}
# User
afterglow-monokai-syntax, v1.3.4 (inactive)
alpenglow-atom-syntax, v0.0.3 (inactive)
alpenglow-monokai-atom-syntax, v0.0.6 (inactive)
atom-bootstrap3, v1.2.12 (inactive)
expose, v0.12.2 (inactive)
file-icons, v1.7.25 (active)
gaia-dark-syntax, v1.1.0 (active)
gloom, v0.3.4 (inactive)
language-pug, v0.0.19 (active)
minimap, v4.26.3 (active)
monokai-complete-syntax, v0.2.3 (inactive)
nucleus-dark-ui, v0.10.15 (inactive)
package-cop, v0.2.10 (active)
pigments, v0.38.0 (active)
preview-plus, v1.2.7 (inactive)
seti-ui, v1.3.2 (inactive)
Stylus, v3.1.0 (active)
todo-show, v1.8.0 (inactive)
atom-dark-syntax, v0.28.0 (inactive)
atom-dark-ui, v0.53.0 (inactive)
atom-light-syntax, v0.29.0 (inactive)
atom-light-ui, v0.46.0 (inactive)
base16-tomorrow-dark-theme, v1.4.0 (inactive)
base16-tomorrow-light-theme, v1.4.0 (inactive)
one-dark-ui, v1.8.2 (active)
one-light-ui, v1.8.2 (inactive)
one-dark-syntax, v1.6.0 (inactive)
one-light-syntax, v1.6.0 (inactive)
solarized-dark-syntax, v1.1.1 (inactive)
solarized-light-syntax, v1.1.1 (inactive)
about, v1.7.2 (active)
archive-view, v0.62.0 (active)
autocomplete-atom-api, v0.10.0 (inactive)
autocomplete-css, v0.14.1 (inactive)
autocomplete-html, v0.7.2 (inactive)
autocomplete-plus, v2.33.1 (active)
autocomplete-snippets, v1.11.0 (inactive)
autoflow, v0.29.0 (inactive)
autosave, v0.23.2 (active)
background-tips, v0.26.1 (active)
bookmarks, v0.43.2 (active)
bracket-matcher, v0.82.2 (active)
command-palette, v0.39.1 (active)
deprecation-cop, v0.55.1 (active)
dev-live-reload, v0.47.0 (inactive)
encoding-selector, v0.22.0 (active)
exception-reporting, v0.40.0 (active)
find-and-replace, v0.204.2 (inactive)
fuzzy-finder, v1.4.0 (active)
git-diff, v1.2.0 (active)
go-to-line, v0.31.2 (inactive)
grammar-selector, v0.48.2 (active)
image-view, v0.60.0 (active)
incompatible-packages, v0.26.1 (active)
keybinding-resolver, v0.35.0 (active)
line-ending-selector, v0.5.1 (active)
link, v0.31.2 (inactive)
markdown-preview, v0.159.1 (active)
metrics, v1.1.2 (inactive)
notifications, v0.65.1 (active)
open-on-github, v1.2.1 (inactive)
package-generator, v1.0.2 (inactive)
settings-view, v0.244.0 (active)
snippets, v1.0.4 (active)
spell-check, v0.68.5 (active)
status-bar, v1.6.0 (active)
styleguide, v0.48.0 (active)
symbols-view, v0.113.1 (inactive)
tabs, v0.103.1 (active)
timecop, v0.33.2 (active)
tree-view, v0.211.1 (active)
update-package-dependencies, v0.10.0 (active)
welcome, v0.35.1 (active)
whitespace, v0.35.0 (active)
wrap-guide, v0.39.0 (active)
language-c, v0.54.0 (inactive)
language-clojure, v0.22.1 (active)
language-coffee-script, v0.48.1 (active)
language-csharp, v0.13.0 (inactive)
language-css, v0.40.1 (active)
language-gfm, v0.88.0 (active)
language-git, v0.15.0 (active)
language-go, v0.43.0 (inactive)
language-html, v0.46.1 (active)
language-hyperlink, v0.16.1 (active)
language-java, v0.24.0 (inactive)
language-javascript, v0.122.0 (active)
language-json, v0.18.3 (active)
language-less, v0.29.6 (inactive)
language-make, v0.22.2 (inactive)
language-mustache, v0.13.0 (active)
language-objective-c, v0.15.1 (inactive)
language-perl, v0.37.0 (active)
language-php, v0.37.3 (inactive)
language-property-list, v0.8.0 (active)
language-python, v0.45.1 (inactive)
language-ruby, v0.70.2 (inactive)
language-ruby-on-rails, v0.25.1 (inactive)
language-sass, v0.57.0 (inactive)
language-shellscript, v0.23.0 (active)
language-source, v0.9.0 (active)
language-sql, v0.25.0 (active)
language-text, v0.7.1 (active)
language-todo, v0.29.1 (active)
language-toml, v0.18.1 (inactive)
language-xml, v0.34.12 (active)
language-yaml, v0.27.1 (active)
# Dev
No dev packages
`
@guidolarosa Actually you still have v0.38 installed, you might probably need to apm uninstall pigments
then apm install pigments@0.37.0
Hey @abe33 ! Yes but I installed 0.37.0 throught apm and Atom. Didn't work either...
Hi! This problem showed up after reinstalling Pigments on Atom via the Install Packages windows. I reinstalled it because it wasn't working for a couple of days, and after I installed it for the second time, this error shows up...
Atom Version: 1.11.2 Electron Version: 0.37.8 System: Mac OS X 10.10 Thrown From: pigments package, v0.37.0
Stack Trace
Uncaught TypeError: ColorContext is not a constructor
Commands
Config
Installed Packages
`
Is this a bug or a mistake in my configuration?
Thanks.