Closed Evpok closed 6 years ago
I think it's a babel thing; see this issue. Not sure what caused it yet, or if it can be fixed on this end.
Wow, it's obscure.
So this package transpiles eveything through babel, and targets es2015 or something. That's fine. I spent a long time looking for changes in Babel related files in Atom core, but no dice. Then I search the error some more, and see a passing comment about this being incompatible with es6 modules.
OK. So the issue is we're extending Disposable
, which is defined in event-kit
. Turns out that module was decaffeinated a couple of weeks ago, into the new es6 syntax. Before this, it was being compiled into the same JS version as Babel is, so everything was happy. Now it's not.
And to confirm, it worked when I built Atom using event-kit@2.5.0
(the previous version).
@Aerijo Thanks for tracking down the problem! Now to figure out if there's some way of fixing this without making changes to event-kit...
I also get the same error with Atom 1.31.2, but my stack trace is different, so it's likely not the sam eissue.
Atom: 1.31.2 x64 Electron: 2.0.7 OS: Debian GNU/Linux Thrown From: latex package 0.50.0
Failed to activate the latex package
At Cannot find module '../type/js/undefined'
Error: Cannot find module '../type/js/undefined'
at Module._resolveFilename (module.js:543:15)
at Module._resolveFilename (/usr/share/atom/resources/electron.asar/common/reset-search-paths.js:35:12)
at Function.get_Module._resolveFilename (/usr/share/atom/resources/app/src/module-cache.js:354:58)
at Module.require (/app.asar/static/index.js:40:43)
at require (/usr/share/atom/resources/app/src/native-compile-cache.js:66:33)
at /packages/latex/node_modules/js-yaml/lib/js-yaml/schema/default_full.js:21:5)
at /packages/latex/node_modules/js-yaml/lib/js-yaml/schema/default_full.js:27:3)
at Module.get_Module._compile (/usr/share/atom/resources/app/src/native-compile-cache.js:106:36)
at Object.value [as .js] (/usr/share/atom/resources/app/src/compile-cache.js:240:29)
at Module.load (module.js:561:32)
at tryModuleLoad (module.js:504:12)
at Function.Module._load (module.js:496:3)
at Module.require (/app.asar/static/index.js:47:45)
at require (/usr/share/atom/resources/app/src/native-compile-cache.js:66:33)
at /packages/latex/node_modules/js-yaml/lib/js-yaml/loader.js:9:27)
at /packages/latex/node_modules/js-yaml/lib/js-yaml/loader.js:1600:3)
at Module.get_Module._compile (/usr/share/atom/resources/app/src/native-compile-cache.js:106:36)
at Object.value [as .js] (/usr/share/atom/resources/app/src/compile-cache.js:240:29)
at Module.load (module.js:561:32)
at tryModuleLoad (module.js:504:12)
at Function.Module._load (module.js:496:3)
at Module.require (/app.asar/static/index.js:47:45)
at require (/usr/share/atom/resources/app/src/native-compile-cache.js:66:33)
at /packages/latex/node_modules/js-yaml/lib/js-yaml.js:4:14)
at /packages/latex/node_modules/js-yaml/lib/js-yaml.js:41:3)
at Module.get_Module._compile (/usr/share/atom/resources/app/src/native-compile-cache.js:106:36)
at Object.value [as .js] (/usr/share/atom/resources/app/src/compile-cache.js:240:29)
at Module.load (module.js:561:32)
at tryModuleLoad (module.js:504:12)
at Function.Module._load (module.js:496:3)
Wow, sorry this was broken for so long. The bug was a very unexpected consequence of using JavaScript classes, instead of Coffee-script classes (which compile to regular JavaScript functions). This will be fixed in Atom 1.32. The fix is here: https://github.com/atom/event-kit/pull/44.
@maxbrunsfeld Thanks for the fix and the update!
Closing this as fixed; the issue will not be present when Atom 1.32 is released.
Exception thrown at package activation
Atom: 1.32.0-beta0 x64 Electron: 2.0.9 OS: KDE neon Thrown From: latex package 0.50.0
Stack Trace
Failed to activate the latex package