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

Unexpected token ) - Failed to activate the file-icons package #753

Closed
Rockster160 opened this issue Aug 13, 2018 · 6 comments
Closed

Unexpected token ) - Failed to activate the file-icons package #753

Rockster160 opened this issue Aug 13, 2018 · 6 comments
Labels
bug Confirmed defect in package logic, deprecation notices, and PRs which fix them.

Comments

@Rockster160
Copy link

Updated file-icons to the latest version this morning and got the error. file-icons was the only package updated at the time.

Happy to answer any questions / supply any more information that could help fix this.
It looks like the "bug" is the icons falling back to:

messages image 3061620444

Atom: 1.23.3 x64
Electron: 1.6.15
OS: Mac OS X 10.13.6
Thrown From: file-icons package 2.1.23

Stack Trace

Failed to activate the file-icons package

At Unexpected token )

SyntaxError: Unexpected token )
    at Module.get_Module._compile (/Applications/Atom.app/Contents/Resources/app/src/native-compile-cache.js:94:52)
    at Object.value [as .js] (/Applications/Atom.app/Contents/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 (/app.asar/static/index.js:47:45)
    at require (/Applications/Atom.app/Contents/Resources/app/src/native-compile-cache.js:66:33)
    at /packages/file-icons/lib/main.js:7:25)
    at Object.activate (/packages/file-icons/lib/main.js:15:7)
    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

Non-Core Packages

Atom-Syntax-highlighting-for-Sass 0.5.0 
autocomplete-ruby 0.2.8 
change-case 0.6.5 
clipboard-plus 0.5.1 
color-picker 2.3.0 
css-declaration-sorter 1.2.2 
file-icons 2.1.23 
git-diff-details 1.4.0 
minimap 4.29.8 
minimap-git-diff 4.3.1 
multi-cursor-aligner 0.0.0 
multi-cursor-increment 0.1.1 
multi-select-switch 0.0.0 
multiclip 0.0.0 
pigments 0.40.2 
rails-latest-migration 1.1.6 
rails-transporter 1.7.1 
rainbow-delimiters 2.1.2 
svg-preview 0.12.1 
tablr 1.8.3 
toggle-quotes 1.1.1 
@Alhadis
Copy link
Member

Alhadis commented Aug 13, 2018

Atom: 1.23.3 x64

You're running a pretty outdated version of Atom. Does upgrading not help?

You shouldn't be getting syntax errors unless the extracted package files were corrupt. Could you run this command and tell me what it outputs?

$ shopt -s globstar;
$ shasum ~/.atom/packages/file-icons/lib/{*.js,**/*.js}

@Rockster160
Copy link
Author

Ah. Didn't realize Atom was out of date. Computer was having issues with auto-update, it seems.
Reinstalled Atom and all packages and things are looking good now. Thanks for the prompt reply. 👍

@Alhadis
Copy link
Member

Alhadis commented Aug 13, 2018

No problem! I should either bump the minimum required Atom version, or investigate exactly what syntax it is that it can't handle... 🤔

@zedin27
Copy link

zedin27 commented Aug 14, 2018

Yeah, I'm using 1.23.3 in OSX 64x, and I'm encountering the same issue. I prefer if there is a minimum version to run it properly :D

@Alhadis
Copy link
Member

Alhadis commented Aug 14, 2018

Well, setting a minimum version won't do any good now... 😞 If I bumped the version and cut another release, users running v1.23.3 will still be downloading the last (incompatible release).

This issue's been opened by 30 unique visitors, so plenty more people will be complaining, I suspect. Only responsible thing to do is cut a patch release to correct it.

FYI, it's the trailing commas it can't handle. Atom v1.23.3 embeds Node 7.4.0, which doesn't support trailing comma syntax introduced in Node 8+. Forgot how recent that addition was. 😕

@Alhadis
Copy link
Member

Alhadis commented Aug 14, 2018

Okay, fixed in v2.1.24. That'll be the last file-icons release to support this particular version. 😉 Anybody still running an outdated Atom version should, well, upgrade manually.

npm nah

Alhadis added a commit that referenced this issue Aug 14, 2018
This ensures that future package releases will stay compatible with Atom
versions that support ES2017 features (notably trailing commas, which're
likely to be included as a matter-of-habit).

Refs: #753
@Alhadis Alhadis added the bug Confirmed defect in package logic, deprecation notices, and PRs which fix them. label Oct 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed defect in package logic, deprecation notices, and PRs which fix them.
Projects
None yet
Development

No branches or pull requests

3 participants