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 . #91

Closed
scottstensland opened this issue Jun 17, 2021 · 3 comments · Fixed by #92
Closed

Unexpected token . #91

scottstensland opened this issue Jun 17, 2021 · 3 comments · Fixed by #92

Comments

@scottstensland
Copy link

scottstensland commented Jun 17, 2021

seeing error

Unexpected token .
Hide Stack Trace
/home/eve/.atom/packages/intentions/dist/index.js:1
(function (exports, require, module, __filename, __dirname, process, global, Buffer) { return function (exports, require, module, __filename, __dirname) { var e,t=require("atom").Disposable,n=require("assert"),i=(e=require("disposable-event"))&&e.__esModule?e.default:e;function s(e,t,n,i){Object.defineProperty(e,t,{get:n,set:i,enumerable:!0,configurable:!0})}s(module.exports,"consumeHighlightIntentions",(()=>Re)),s(module.exports,"activate",(()=>je)),s(module.exports,"deactivate",(()=>Fe)),s(module.exports,"consumeListIntentions",(()=>Ve));var o={};Object.defineProperty(o,"__esModule",{value:!0}),o.CompositeDisposable=o.Disposable=o.Emitter=void 0;var r={};Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t
SyntaxError: Unexpected token .
    at new Script (vm.js:83:7)
    at NativeCompileCache.runInThisContext (/usr/share/atom/resources/app/static/<embedded>:11:146391)
    at Module.get_Module._compile (/usr/share/atom/resources/app/static/<embedded>:11:147275)
    at Object.value [as .js] (/usr/share/atom/resources/app/static/<embedded>:11:151046)
    at Module.load (internal/modules/cjs/loader.js:645:32)
    at Function.Module._load (internal/modules/cjs/loader.js:560:12)
    at Module.require (file:///usr/share/atom/resources/app.asar/static/index.js:72:46)
    at require (internal/modules/cjs/helpers.js:16:16)
    at customRequire (/usr/share/atom/resources/app/static/<embedded>:1:696928)
    at Package.requireMainModule (/usr/share/atom/resources/app/static/<embedded>:11:3578827)
    at /usr/share/atom/resources/app/static/<embedded>:11:3565367
    at Package.measure (/usr/share/atom/resources/app/static/<embedded>:11:3564167)
    at Package.load (/usr/share/atom/resources/app/static/<embedded>:11:3564940)
    at PackageManager.loadAvailablePackage (/usr/share/atom/resources/app/static/<embedded>:11:382096)
    at /usr/share/atom/resources/app/static/<embedded>:11:380519
    at Config.transact (/usr/share/atom/resources/app/static/<embedded>:11:332489)
    at PackageManager.loadPackages (/usr/share/atom/resources/app/static/<embedded>:11:380457)
    at /usr/share/atom/resources/app/static/<embedded>:1:717515
    at async Promise.all (index 0)
    at AtomEnvironment.startEditorWindow (/usr/share/atom/resources/app/static/<embedded>:1:719554)

same as closed issue #64

still an error even after doing

apm uninstall intentions
apm install intentions
atom --version
Atom    : 1.53.0
Electron: 6.1.12
Chrome  : 76.0.3809.146
Node    : 12.4.0

Thrown From: intentions package 2.1.0

seeing error on my Ubuntu 21.04 laptop but issue is orthogonal to the OS

@mlavi
Copy link

mlavi commented Jun 17, 2021

Nearly identical error on LinuxMint 20.1 with intentions package 2.1.0, didn't see it with 2.0.0:

$ atom --version
Atom    : 1.48.0
Electron: 5.0.13
Chrome  : 73.0.3683.121
Node    : 12.0.0

$ apm --version
apm  2.5.0
npm  6.14.5
node 10.20.1 x64
atom 1.48.0
python 2.7.18
git 2.32.0

Error message:

Failed to load the intentions package

Unexpected token .
Hide Stack Trace
/home/mark/.atom/packages/intentions/dist/index.js:1
(function (exports, require, module, __filename, __dirname, process, global, Buffer) { return function (exports, require, module, __filename, __dirname) { var e,t=require("atom").Disposable,n=require("assert"),i=(e=require("disposable-event"))&&e.__esModule?e.default:e;function s(e,t,n,i){Object.defineProperty(e,t,{get:n,set:i,enumerable:!0,configurable:!0})}s(module.exports,"consumeHighlightIntentions",(()=>Re)),s(module.exports,"activate",(()=>je)),s(module.exports,"deactivate",(()=>Fe)),s(module.exports,"consumeListIntentions",(()=>Ve));var o={};Object.defineProperty(o,"__esModule",{value:!0}),o.CompositeDisposable=o.Disposable=o.Emitter=void 0;var r={};Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return f
SyntaxError: Unexpected token .
    at new Script (vm.js:85:7)
    at NativeCompileCache.runInThisContext (/usr/share/atom/resources/app/static/<embedded>:11:146396)
    at Module.get_Module._compile (/usr/share/atom/resources/app/static/<embedded>:11:147280)
    at Object.value [as .js] (/usr/share/atom/resources/app/static/<embedded>:11:151051)
    at Module.load (internal/modules/cjs/loader.js:701:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:633:12)
    at Function.Module._load (internal/modules/cjs/loader.js:625:3)
    at Module.require (file:///usr/share/atom/resources/app.asar/static/index.js:72:46)
    at require (internal/modules/cjs/helpers.js:14:16)
    at customRequire (/usr/share/atom/resources/app/static/<embedded>:1:695413)
    at Package.requireMainModule (/usr/share/atom/resources/app/static/<embedded>:11:3201866)
    at /usr/share/atom/resources/app/static/<embedded>:11:3188406
    at Package.measure (/usr/share/atom/resources/app/static/<embedded>:11:3187238)
    at Package.load (/usr/share/atom/resources/app/static/<embedded>:11:3187979)
    at PackageManager.loadAvailablePackage (/usr/share/atom/resources/app/static/<embedded>:11:381522)
    at /usr/share/atom/resources/app/static/<embedded>:11:379945
    at Config.transact (/usr/share/atom/resources/app/static/<embedded>:11:332010)
    at PackageManager.loadPackages (/usr/share/atom/resources/app/static/<embedded>:11:379883)
    at /usr/share/atom/resources/app/static/<embedded>:1:716024
    at async Promise.all (index 0)
    at AtomEnvironment.startEditorWindow (/usr/share/atom/resources/app/static/<embedded>:1:718063)

I will try to update to the latest Atom version to see if that makes a difference.

@mlavi
Copy link

mlavi commented Jun 17, 2021

Yes, after uninstalling my OS provided atom package with sudo apt-get remove atom and then installing latest .deb install from atom.io homepage, this issue was resolved.

$ atom --version
Atom    : 1.57.0
Electron: 9.4.4
Chrome  : 83.0.4103.122
Node    : 12.14.1

I switched from the DEB to my OS provided package to provide automatic upgrades via apt, but we'll see if I get notices for new atom versions. Looks like my upstream package builder for Ubuntu has lagged a bit.

@aminya
Copy link
Collaborator

aminya commented Jun 17, 2021

Yes, you should update your Atom versions. I don't have access to those package managers, and they are considered unofficial. You should install Atom from:
https://atom.io/

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