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 atom-beautify package #1734

Closed
sherbetxia opened this issue Jun 21, 2017 · 8 comments
Closed

Failed to activate the atom-beautify package #1734

sherbetxia opened this issue Jun 21, 2017 · 8 comments
Assignees

Comments

@sherbetxia
Copy link

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.18.0 ia32
Electron: 1.3.15
OS: Microsoft Windows 8.1
Thrown From: atom-beautify package 0.30.2

Stack Trace

Failed to activate the atom-beautify package

At Cannot find module 'event-kit'

Error: Cannot find module 'event-kit'
    at Module._resolveFilename (module.js:455:15)
    at Module._resolveFilename (~/AppData/Local/atom/app-1.18.0/resources/electron.asar/common/reset-search-paths.js:35:12)
    at Function.get_Module._resolveFilename (~/AppData/Local/atom/app-1.18.0/resources/app/src/module-cache.js:354:58)
    at Module.require (~/AppData/Local/atom/app-1.18.0/resources/app/static/index.js:40:43)
    at require (~/AppData/Local/atom/app-1.18.0/resources/app/src/native-compile-cache.js:66:33)
    at /packages/atom-beautify/src/beautify.coffee:7:25)
    at /packages/atom-beautify/src/beautify.coffee:2:1)
    at Module.get_Module._compile (~/AppData/Local/atom/app-1.18.0/resources/app/src/native-compile-cache.js:106:36)
    at Object.value [as .coffee] (~/AppData/Local/atom/app-1.18.0/resources/app/src/compile-cache.js:239:29)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at Module.require (~/AppData/Local/atom/app-1.18.0/resources/app/static/index.js:47:45)
    at require (internal/module.js:20:19)
    at customRequire (~/AppData/Local/atom/app-1.18.0/resources/app/static/<embedded>:96:26)
    at Package.module.exports.Package.requireMainModule (~/AppData/Local/atom/app-1.18.0/resources/app/src/package.js:887:35)
    at Package.module.exports.Package.activateNow (~/AppData/Local/atom/app-1.18.0/resources/app/src/package.js:242:22)
    at ~/AppData/Local/atom/app-1.18.0/resources/app/src/package.js:968:31
    at Function.module.exports.Emitter.simpleDispatch (~/AppData/Local/atom/app-1.18.0/resources/app/node_modules/event-kit/lib/emitter.js:25:20)
    at Emitter.module.exports.Emitter.emit (~/AppData/Local/atom/app-1.18.0/resources/app/node_modules/event-kit/lib/emitter.js:141:34)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (~/AppData/Local/atom/app-1.18.0/resources/app/src/command-registry.js:246:26)
    at CommandRegistry.handleCommandEvent (~/AppData/Local/atom/app-1.18.0/resources/app/src/command-registry.js:3:65)
    at CommandRegistry.module.exports.CommandRegistry.dispatch (~/AppData/Local/atom/app-1.18.0/resources/app/src/command-registry.js:166:25)
    at AtomEnvironment.module.exports.AtomEnvironment.dispatchApplicationMenuCommand (~/AppData/Local/atom/app-1.18.0/resources/app/src/atom-environment.js:1314:34)
    at EventEmitter.outerCallback (~/AppData/Local/atom/app-1.18.0/resources/app/src/application-delegate.js:334:31)
    at emitThree (events.js:116:13)
    at EventEmitter.emit (events.js:194:7)

Commands

     -0:18.9.0 core:save-as (input.hidden-input)

Non-Core Packages

atom-beautify 0.30.2 
@Glavin001
Copy link
Owner

I'm closing this as a duplicate of the others: https://github.com/Glavin001/atom-beautify/search?q=Cannot+find+module+%27event-kit%27&state=closed&type=Issues&utf8=%E2%9C%93

See #1366 (comment) for fix:

Uninstalling and reinstalling Atom-Beautify has been shown to resolve errors Error: Cannot find module. It occurs when apm has not finished installing event-kit or other packages before Atom activates the package.

@Glavin001 Glavin001 self-assigned this Jun 22, 2017
@valepu
Copy link

valepu commented Jun 22, 2017

I have tried several times uninstalling and reinstalling yesterday. When i tried installing it outside of Atom using apm it just hung (i kept it for like an hour). When i installed (using apm) beautify version 0.30.0 it wokred fine

i'll try again today

@valepu
Copy link

valepu commented Jun 22, 2017

I confirm that using apm (while atom is closed) works even with the latest version altough it took some time for me (about 40 minutes) but that could be just a performance issue on my PC

@mathus13
Copy link

Atom: 1.21.1 x64
Electron: 1.6.15
OS: Ubuntu 17.10
Thrown From: atom-beautify package 0.30.6

Stack Trace

Failed to activate the atom-beautify package

At Languages is not a constructor

TypeError: Languages is not a constructor
    at /packages/atom-beautify/src/beautifiers/index.coffee:103:19
    at /packages/atom-beautify/src/beautifiers/index.coffee:672:16)
    at /packages/atom-beautify/src/beautifiers/index.coffee:1:1)
    at /packages/atom-beautify/src/beautifiers/index.coffee:1:1)
    at Module.get_Module._compile (/opt/atom/resources/app/src/native-compile-cache.js:106:36)
    at Object.value [as .coffee] (/opt/atom/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 (/opt/atom/resources/app/src/native-compile-cache.js:66:33)
    at /packages/atom-beautify/src/beautify.coffee:9:15)
    at /packages/atom-beautify/src/beautify.coffee:2:1)
    at /packages/atom-beautify/src/beautify.coffee:2:1)
    at Module.get_Module._compile (/opt/atom/resources/app/src/native-compile-cache.js:106:36)
    at Object.value [as .coffee] (/opt/atom/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 (internal/module.js:20:19)
    at customRequire (/opt/atom/resources/app/static/<embedded>:96:26)
    at Package.module.exports.Package.requireMainModule (/opt/atom/resources/app/src/package.js:903:35)
    at Package.module.exports.Package.activateNow (/opt/atom/resources/app/src/package.js:242:22)
    at /opt/atom/resources/app/src/package.js:1030:34
    at Function.module.exports.Emitter.simpleDispatch (/opt/atom/resources/app/node_modules/event-kit/lib/emitter.js:25:20)
    at Emitter.module.exports.Emitter.emit (/opt/atom/resources/app/node_modules/event-kit/lib/emitter.js:141:34)
    at triggeredActivationHooks.forEach.hook (/opt/atom/resources/app/src/package-manager.js:700:86)
    at Set.forEach (native)
    at PackageManager.activatePackage (/opt/atom/resources/app/src/package-manager.js:700:43)
    at /opt/atom/resources/app/node_modules/settings-view/lib/package-manager.js:535:35
    at exit (/opt/atom/resources/app/node_modules/settings-view/lib/package-manager.js:128:22)
    at triggerExitCallback (/opt/atom/resources/app/src/buffered-process.js:338:17)
    at /opt/atom/resources/app/src/buffered-process.js:359:17
    at Socket.<anonymous> (/opt/atom/resources/app/src/buffered-process.js:220:15)
    at emitOne (events.js:101:20)
    at Socket.emit (events.js:188:7)
    at Pipe._handle.close [as _onclose] (net.js:501:12)

Commands

     -3:24.6.0 intentions:highlight (input.hidden-input)
     -3:24 command-palette:toggle (input.hidden-input)
     -3:05.3.0 core:confirm (input.hidden-input)
     -3:05.3.0 settings-view:view-installed-packages (input.hidden-input)

Non-Core Packages

atom-alignment 0.13.0 
atom-beautify 0.30.6 
atom-bootstrap3 1.2.12 
atom-ide-ui 0.5.3 
atom-material-syntax 1.0.7 
atom-material-syntax-dark 1.0.0 
atom-material-ui 2.0.6 
atom-terminal 0.8.0 
atom-terminal-panel 4.4.4 
blame 0.12.0 
build 0.69.0 
build-sass 0.11.0 
busy 0.7.0 
busy-signal 1.4.3 
composer 0.5.0 
docblockr 0.12.0 
editor-settings 1.1.3 
file-watcher 1.2.6 
git-plus 7.10.0 
git-time-machine 1.5.9 
highlight-selected 0.13.1 
hyperclick 0.0.0 
ide-html 0.4.0 
ide-json 0.1.0 
ide-php 0.6.9 
ide-vue 0.1.7 
intentions 1.1.5 
language-vue 0.23.1 
linter 2.2.0 
linter-eslint 8.4.0 
linter-markdown 5.2.0 
linter-php 1.5.1 
linter-phpcs 1.6.8 
linter-sass-lint 1.8.3 
linter-scss-lint 3.1.1 
linter-ui-default 1.6.10 
markdown-pdf 2.1.0 
markdown-preview-enhanced 0.14.11 
markdown-preview-plus 2.4.16 
meteor-api 2.20.0 
minimap 4.29.7 
minimap-highlight-selected 4.6.1 
php-integrator-annotations 1.2.0 
php-integrator-autocomplete-plus 1.6.1 
php-integrator-base 3.1.0 
php-integrator-navigation 1.2.1 
php-twig 4.0.0 
pigments 0.40.2 
pretty-json 1.6.4 
project-manager 3.3.5 
remote-sync 4.1.8 
symbols-tree-view 0.14.0 
terminal-plus 0.14.5 
vue-autocomplete 0.1.1 

I have tried uninstalling / reinstalling using both the atom gui as well as apm.

@stevenzeck
Copy link
Contributor

@mathus13 does that happen when you launch Atom, or at some other point?

@mathus13
Copy link

launching atom

@stevenzeck
Copy link
Contributor

Can you open a new issue please?

@jzsoon
Copy link

jzsoon commented Mar 16, 2023

Atom: 1.60.0 x64
os: macOS Venture 13.2.1 (M1 chip 2020)

Cannot find module 'event-kit'
Require stack:

  • /Users/j/.atom/packages/atom-beautify-master/src/beautify.coffee
  • /Applications/Atom.app/Contents/Resources/app.asar/static/index.html
    Hide Stack Trace
    Error: Cannot find module 'event-kit'
    Require stack:
  • /Users/j/.atom/packages/atom-beautify-master/src/beautify.coffee
  • /Applications/Atom.app/Contents/Resources/app.asar/static/index.html
    at Module._resolveFilename (internal/modules/cjs/loader.js:797:17)
    at o._resolveFilename (electron/js2c/renderer_init.js:43:689)
    at Function.get_Module._resolveFilename (/Applications/Atom.app/Contents/Resources/app/static/:11:157942)
    at Module.require (file:///Applications/Atom.app/Contents/Resources/app.asar/static/index.js:61:43)
    at require (/Applications/Atom.app/Contents/Resources/app/static/:11:149229)
    at Object. (/Users/j/.atom/packages/atom-beautify-master/src/beautify.coffee:7:25)
    at Object. (/Users/j/.atom/packages/atom-beautify-master/src/beautify.coffee:2:1)
    at Object. (/Users/j/.atom/packages/atom-beautify-master/src/beautify.coffee:2:1)
    at Module.get_Module._compile (/Applications/Atom.app/Contents/Resources/app/static/:11:149913)
    at Object.value [as .coffee] (/Applications/Atom.app/Contents/Resources/app/static/:11:153507)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Module._load (internal/modules/cjs/loader.js:727:14)
    at Function.Module._load (electron/js2c/asar.js:769:28)
    at Module.require (file:///Applications/Atom.app/Contents/Resources/app.asar/static/index.js:72:46)
    at require (internal/modules/cjs/helpers.js:74:18)
    at customRequire (/Applications/Atom.app/Contents/Resources/app/static/:1:756278)
    at requireModule (/Applications/Atom.app/Contents/Resources/app/static/:14:1175133)
    at Package.requireMainModule (/Applications/Atom.app/Contents/Resources/app/static/:11:3423763)
    at Package.activateNow (/Applications/Atom.app/Contents/Resources/app/static/:11:3411762)
    at /Applications/Atom.app/Contents/Resources/app/static/:14:2607
    at Function.simpleDispatch (/Applications/Atom.app/Contents/Resources/app/static/:11:1187666)
    at Emitter.emit (/Applications/Atom.app/Contents/Resources/app/static/:11:1189107)
    at PackageManager.triggerDeferredActivationHooks (/Applications/Atom.app/Contents/Resources/app/static/:11:386501)
    at /Applications/Atom.app/Contents/Resources/app/static/:11:385252

Try to install from macOS terminal
Atom: 1.60.0 x64
os: macOS Venture 13.2.1 (M1 chip 2020)

j@Js-MacBook-Pro13 ~ % apm install atom-beautify
Installing atom-beautify to /Users/j/.atom/packages /Applications/Atom.app/Contents/Resources/app/apm/lib/install.js:256
if (body.releases.latest) {
^

TypeError: Cannot read property 'latest' of undefined
at /Applications/Atom.app/Contents/Resources/app/apm/lib/install.js:256:29
at Request._callback (/Applications/Atom.app/Contents/Resources/app/apm/lib/request.js:57:22)
at Request.self.callback (/Applications/Atom.app/Contents/Resources/app/apm/node_modules/request/request.js:185:22)
at Request.emit (events.js:223:5)
at Request. (/Applications/Atom.app/Contents/Resources/app/apm/node_modules/request/request.js:1154:10)
at Request.emit (events.js:223:5)
at IncomingMessage. (/Applications/Atom.app/Contents/Resources/app/apm/node_modules/request/request.js:1076:12)
at Object.onceWrapper (events.js:312:28)
at IncomingMessage.emit (events.js:228:7)
at endReadableNT (_stream_readable.js:1185:12)
j@Js-MacBook-Pro13 ~ %

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

6 participants