Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to activate the pigments package #378

Open
dorellanaolivo-zx opened this issue Jan 29, 2018 · 14 comments
Open

Failed to activate the pigments package #378

dorellanaolivo-zx opened this issue Jan 29, 2018 · 14 comments

Comments

@dorellanaolivo-zx
Copy link

dorellanaolivo-zx commented Jan 29, 2018

SyntaxError: Invalid or unexpected token
    at Module.get_Module._compile (atom\app-1.23.3\resources\app\src\native-compile-cache.js:94:52)
    at Object.value [as .coffee] (atom\app-1.23.3\resources\app\src\compile-cache.js:239:29)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (atom/app-1.23.3/resources/app.asar/static/index.js:47:45)
    at require (atom\app-1.23.3\resources\app\src\native-compile-cache.js:66:33)
    at ColorBuffer.module.exports.ColorBuffer.scanBufferForColors (pigments/lib/color-buffer.coffee:389:14)
    at ColorBuffer.module.exports.ColorBuffer.initialize (pigments/lib/color-buffer.coffee:97:27)
    at new ColorBuffer (pigments/lib/color-buffer.coffee:83:6)
    at ColorProject.module.exports.ColorProject.colorBufferForEditor (pigments/lib/color-project.coffee:284:51)
    at pigments/lib/color-project.coffee:258:17
    at Workspace.observeTextEditors (atom\app-1.23.3\resources\app\src\workspace.js:725:15)
    at ColorProject.module.exports.ColorProject.initializeBuffers (pigments/lib/color-project.coffee:254:39)
    at new ColorProject (pigments/lib/color-project.coffee:110:6)
    at Object.activate (pigments/lib/pigments.coffee:19:7)
    at Package.module.exports.Package.activateNow (atom\app-1.23.3\resources\app\src\package.js:255:25)
    at atom\app-1.23.3\resources\app\src\package.js:227:38
    at Package.module.exports.Package.measure (atom\app-1.23.3\resources\app\src\package.js:99:21)
    at atom\app-1.23.3\resources\app\src\package.js:220:32
    at Package.module.exports.Package.activate (atom\app-1.23.3\resources\app\src\package.js:217:40)
    at PackageManager.activatePackage (atom\app-1.23.3\resources\app\src\package-manager.js:695:42)
    at atom\app-1.23.3\resources\app\node_modules\settings-view\lib\package-manager.js:535:35
    at exit (atom\app-1.23.3\resources\app\node_modules\settings-view\lib\package-manager.js:128:22)
    at triggerExitCallback (atom\app-1.23.3\resources\app\src\buffered-process.js:338:17)
    at ChildProcess.<anonymous> (atom\app-1.23.3\resources\app\src\buffered-process.js:368:17)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)```
@luisgagocasas
Copy link

luisgagocasas commented Jan 30, 2018

Error: Cannot find 'highlights-component' in the require cache.
    at requireCore (~/.atom/packages/pigments/lib/pigments.coffee:310:19)
    at Object.patchAtom (~/.atom/packages/pigments/lib/pigments.coffee:312:26)
    at Object.activate (~/.atom/packages/pigments/lib/pigments.coffee:16:6)
    at Package.module.exports.Package.activateNow (/usr/share/atom/resources/app/src/package.js:255:25)
    at /usr/share/atom/resources/app/src/package.js:227:38
    at Package.module.exports.Package.measure (/usr/share/atom/resources/app/src/package.js:99:21)
    at /usr/share/atom/resources/app/src/package.js:220:32
    at Package.module.exports.Package.activate (/usr/share/atom/resources/app/src/package.js:217:40)
    at PackageManager.activatePackage (/usr/share/atom/resources/app/src/package-manager.js:695:42)
    at config.transactAsync (/usr/share/atom/resources/app/src/package-manager.js:670:36)
    at Config.module.exports.Config.transactAsync (/usr/share/atom/resources/app/src/config.js:367:24)
    at PackageManager.activatePackages (/usr/share/atom/resources/app/src/package-manager.js:668:23)
    at PackageManager.activate (/usr/share/atom/resources/app/src/package-manager.js:647:50)
    at /usr/share/atom/resources/app/src/atom-environment.js:865:36

@benthurley82
Copy link

benthurley82 commented Jan 31, 2018

Atom updated itself to v1.23.3 on OSX and when it restarted I got this error: Failed to activate pigments package. The error said a bug has already been raised and pointed to here but the stack trace was different to the two above.

TypeError: Cannot read property 'length' of undefined
    at Function.Module._resolveLookupPaths (module.js:320:23)
    at Module._resolveFilename (module.js:461:31)
    at Module._resolveFilename (/Applications/Atom.app/Contents/Resources/electron.asar/common/reset-search-paths.js:35:12)
    at Function.get_Module._resolveFilename (/Applications/Atom.app/Contents/Resources/app/src/module-cache.js:354:58)
    at Module.require (file:///Applications/Atom.app/Contents/Resources/app.asar/static/index.js:40:43)
    at require (/Applications/Atom.app/Contents/Resources/app/src/native-compile-cache.js:66:33)
    at requireCore (~/.atom/packages/pigments/lib/pigments.coffee:295:7)
    at Object.patchAtom (~/.atom/packages/pigments/lib/pigments.coffee:297:26)
    at Object.activate (~/.atom/packages/pigments/lib/pigments.coffee:16:6)
    at Package.module.exports.Package.activateNow (/Applications/Atom.app/Contents/Resources/app/src/package.js:255:25)
    at /Applications/Atom.app/Contents/Resources/app/src/package.js:227:38
    at Package.module.exports.Package.measure (/Applications/Atom.app/Contents/Resources/app/src/package.js:99:21)
    at /Applications/Atom.app/Contents/Resources/app/src/package.js:220:32
    at Package.module.exports.Package.activate (/Applications/Atom.app/Contents/Resources/app/src/package.js:217:40)
    at PackageManager.activatePackage (/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:695:42)
    at config.transactAsync (/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:670:36)
    at Config.module.exports.Config.transactAsync (/Applications/Atom.app/Contents/Resources/app/src/config.js:367:24)
    at PackageManager.activatePackages (/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:668:23)
    at PackageManager.activate (/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:647:50)
    at /Applications/Atom.app/Contents/Resources/app/src/atom-environment.js:865:36

@Cxarli
Copy link
Collaborator

Cxarli commented Feb 10, 2018

@dorellanaolivo @benthurley82 Could you please share your Atom version, Pigments version, and OS +version?

@luisgagocasas Duplicate of #341 #335 #334 #329 #328 #318 #314 #201 #338

@preagan
Copy link

preagan commented Feb 12, 2018

I'm getting what appeared to be the same error as benthurley82.
Upgrading my Pigments version 0.29.1 to version 0.40.2 seems to keep that error from coming up any longer.

Atom version: 1.23.3
OS +version: Mac OS X 10.11.6

@benthurley82
Copy link

@C-Bouthoorn sorry I don't have the details with me right now, however, the problem sorted itself out after another round of updates. I think what I did before was update all the plugins and then update Atom. Then I got the problem with pigments not working and a message telling me about this ticket. I had another look for plugin updates and pigments said there was another update available, presumably because Atom was now at a later version? Anyway doing this third round of updates got everything working together without problems.
So problem solved for me now thanks.

@cahayabulan
Copy link

cahayabulan commented Feb 22, 2018

Atom 1.24.0 x64
OS X 10.13.3

Error: Cannot find 'highlights-component' in the require cache.
  at requireCore (/Users/kazuhiro/.atom/packages/pigments/lib/pigments.coffee:310:19)
  at Object.patchAtom (/Users/kazuhiro/.atom/packages/pigments/lib/pigments.coffee:312:26)
  at Object.activate (/Users/kazuhiro/.atom/packages/pigments/lib/pigments.coffee:16:6)
  at Package.activateNow (<embedded>:72380:33)
  at measure (<embedded>:72356:33)
  at Package.measure (<embedded>:72238:25)
  at activationPromise.Promise (<embedded>:72350:20)
  at Package.activate (<embedded>:72348:38)
  at PackageManager.activatePackage (<embedded>:25500:42)
  at config.transactAsync (<embedded>:25475:36)
  at Config.module.exports.Config.transactAsync (<embedded>:21896:24)
  at PackageManager.activatePackages (<embedded>:25473:23)
  at PackageManager.activate (<embedded>:25452:50)
  at loadStatePromise.loadState.then (<embedded>:1081:27)

@jpaulin
Copy link

jpaulin commented Mar 8, 2018

Btw, I got this same error on Atom startup.

What is the require cache trying to achieve?

  • preventing unnecessary (re)loads of code, or
  • something else?

@Cxarli
Copy link
Collaborator

Cxarli commented Mar 8, 2018

@cahayabulan This issue has already been answered quite some times now, the answer is to restart Atom. This problem is not related to Pigments, but is an issue within Atom itself.

@carlosescri
Copy link

FYI: I deleted Atom some time ago and today I decided to give it another chance. After installing, every time I restarted the app (on Mac) I got an error related to pigments. In my case I've removed the .atom folder inside my user folder and the error disappeared (I reinstalled Atom so it was not a problem for me). Hope this helps someone.

@LeszekWrobel
Copy link

LeszekWrobel commented May 31, 2018

Hello.
I've latest version Atom 1.26.1x64 and latest version Pigments package 0.40.2.
I've need help because:

"Failed to activate the pigments package."
[Enter steps to reproduce:]
Atom: 1.26.1 x64
Electron: 1.7.11
OS: Microsoft Windows 10 Home
Thrown From: pigments package 0.40.2

Stack Trace

Failed to activate the pigments package

At Invalid or unexpected token

SyntaxError: Invalid or unexpected token
    at Module.get_Module._compile (~/AppData/Local/atom/app-1.26.1/resources/app/src/native-compile-cache.js:94:52)
    at Object.value [as .coffee] (~/AppData/Local/atom/app-1.26.1/resources/app/src/compile-cache.js:240:29)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (/app.asar/static/index.js:47:45)
    at require (internal/module.js:20:19)
    at customRequire (~/AppData/Local/atom/app-1.26.1/resources/app/static/<embedded>:96:26)
    at Package.requireMainModule (~/AppData/Local/atom/app-1.26.1/resources/app/src/package.js:782:33)
    at Package.activateNow (~/AppData/Local/atom/app-1.26.1/resources/app/src/package.js:220:40)
    at measure (~/AppData/Local/atom/app-1.26.1/resources/app/src/package.js:206:33)
    at Package.measure (~/AppData/Local/atom/app-1.26.1/resources/app/src/package.js:88:25)
    at activationPromise.Promise (~/AppData/Local/atom/app-1.26.1/resources/app/src/package.js:200:20)
    at Promise (<anonymous>)
    at Package.activate (~/AppData/Local/atom/app-1.26.1/resources/app/src/package.js:198:38)
    at PackageManager.activatePackage (~/AppData/Local/atom/app-1.26.1/resources/app/src/package-manager.js:695:42)
    at config.transactAsync (~/AppData/Local/atom/app-1.26.1/resources/app/src/package-manager.js:670:36)
    at Config.transactAsync (~/AppData/Local/atom/app-1.26.1/resources/app/src/config.js:866:28)
    at PackageManager.activatePackages (~/AppData/Local/atom/app-1.26.1/resources/app/src/package-manager.js:668:23)
    at PackageManager.activate (~/AppData/Local/atom/app-1.26.1/resources/app/src/package-manager.js:647:50)
    at loadStatePromise.loadState.then (~/AppData/Local/atom/app-1.26.1/resources/app/src/atom-environment.js:871:27)
    at <anonymous>

Commands

Non-Core Packages

atom-beautify 0.32.5 
emmet 2.4.3 
file-icons 2.1.21 
git-plus 7.10.2 
minimap 4.29.8 
pigments 0.40.2 

What should I do?
Thanks for your help
I also have a problem with the atom-beautify 0.32.5 in PHP.
Leszek.W

@Cxarli
Copy link
Collaborator

Cxarli commented Jun 1, 2018

@LeszekWrobel That Stack Trace doesn't seem to originate from the pigments package. I suggest reinstalling Atom, since it seems some core files are corrupted.

@hugolpz
Copy link

hugolpz commented Aug 9, 2018

sudo apt-get remove atom
sudo apt-get install atom

I still have the error popping up. Atom v1.26.1, Ubuntu 16.04, 64-bit. I haven't restart my computer tho.

screenshot from 2018-08-09 21-20-03

TypeError: Cannot read property 'length' of undefined
    at Function.Module._resolveLookupPaths (module.js:320:23)
    at Module._resolveFilename (module.js:461:31)
    at Module._resolveFilename (/opt/atom/resources/electron.asar/common/reset-search-paths.js:35:12)
    at Function.get_Module._resolveFilename (/opt/atom/resources/app/src/module-cache.js:354:58)
    at Module.require (file:///opt/atom/resources/app.asar/static/index.js:40:43)
    at require (/opt/atom/resources/app/src/native-compile-cache.js:66:33)
    at requireCore (/home/cri-ninja/.atom/packages/pigments/lib/pigments.coffee:295:7)
    at Object.patchAtom (/home/cri-ninja/.atom/packages/pigments/lib/pigments.coffee:297:26)
    at Object.activate (/home/cri-ninja/.atom/packages/pigments/lib/pigments.coffee:16:6)
    at Package.activateNow (/opt/atom/resources/app/src/package.js:230:33)
    at measure (/opt/atom/resources/app/src/package.js:206:33)
    at Package.measure (/opt/atom/resources/app/src/package.js:88:25)
    at activationPromise.Promise (/opt/atom/resources/app/src/package.js:200:20)
    at Promise (<anonymous>)
    at Package.activate (/opt/atom/resources/app/src/package.js:198:38)
    at PackageManager.activatePackage (/opt/atom/resources/app/src/package-manager.js:695:42)
    at config.transactAsync (/opt/atom/resources/app/src/package-manager.js:670:36)
    at Config.transactAsync (/opt/atom/resources/app/src/config.js:866:28)
    at PackageManager.activatePackages (/opt/atom/resources/app/src/package-manager.js:668:23)
    at PackageManager.activate (/opt/atom/resources/app/src/package-manager.js:647:50)
    at loadStatePromise.loadState.then (/opt/atom/resources/app/src/atom-environment.js:871:27)
    at <anonymous>

I see from above this issue have duplicates. Which one to go so to find how to solve it ?

@Cxarli
Copy link
Collaborator

Cxarli commented Aug 10, 2018

@hugolpz What's your version of pigments? (Go to Setting > Packages > Pigments)
Also, the latest version of Atom is 1.29.0, so your repos are out of date. Please follow the installation guide to update Atom to the latest version.

@hugolpz
Copy link

hugolpz commented Aug 10, 2018

0.39.0. Thanks to you I'am updating to the new one : no more error message. Still new on Atom. I will also check out my repository for atom.
screenshot from 2018-08-10 22-46-16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants