Atom-beautify: Cannot find module 'event-kit'

Created on 18 Nov 2016  ·  9Comments  ·  Source: Glavin001/atom-beautify

[email protected] postinstall /tmp/apm-install-dir-1161018-10470-17v9gln/node_modules/atom-beautify
node script/build-options.js

/tmp/apm-install-dir-1161018-10470-17v9gln
└── (empty)

npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
(node) warning: possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners() to increase limit.
Trace
at TLSSocket.addListener (events.js:239:17)
at TLSSocket.Readable.on (_stream_readable.js:673:33)
at Request. (/usr/share/atom/resources/app/apm/node_modules/npm-registry-client/lib/request.js:153:7)
at emitOne (events.js:77:13)
at Request.emit (events.js:169:7)
at ClientRequest. (/usr/share/atom/resources/app/apm/node_modules/request/request.js:823:10)
at emitOne (events.js:82:20)
at ClientRequest.emit (events.js:169:7)
at tickOnSocket (_http_client.js:502:7)
at onSocketNT (_http_client.js:514:5)
(node) warning: possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners() to increase limit.
Trace
at TLSSocket.addListener (events.js:239:17)
at TLSSocket.Readable.on (_stream_readable.js:673:33)
at Request. (/usr/share/atom/resources/app/apm/node_modules/npm-registry-client/lib/request.js:153:7)
at emitOne (events.js:77:13)
at Request.emit (events.js:169:7)
at ClientRequest. (/usr/share/atom/resources/app/apm/node_modules/request/request.js:823:10)
at emitOne (events.js:82:20)
at ClientRequest.emit (events.js:169:7)
at tickOnSocket (_http_client.js:502:7)
at onSocketNT (_http_client.js:514:5)
module.js:327
throw err;
^

Error: Cannot find module '/tmp/apm-install-dir-1161018-10470-17v9gln/node_modules/atom-beautify/script/build-options.js'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Function.Module.runMain (module.js:441:10)
at startup (node.js:139:18)
at node.js:968:3
npm WARN enoent ENOENT: no such file or directory, open '/tmp/apm-install-dir-1161018-10470-17v9gln/package.json'
npm WARN apm-install-dir-1161018-10470-17v9gln No description
npm WARN apm-install-dir-1161018-10470-17v9gln No repository field.
npm WARN apm-install-dir-1161018-10470-17v9gln No README data
npm WARN apm-install-dir-1161018-10470-17v9gln No license field.
npm ERR! Linux 4.4.0-47-generic
npm ERR! argv "/usr/share/atom/resources/app/apm/bin/node" "/usr/share/atom/resources/app/apm/node_modules/npm/bin/npm-cli.js" "--globalconfig" "/root/.atom/.apm/.apmrc" "--userconfig" "/root/.atom/.apmrc" "install" "/tmp/d-1161018-10470-1xstdyo/package.tgz" "--runtime=electron" "--target=1.3.6" "--arch=x64" "--global-style"
npm ERR! node v4.4.5
npm ERR! npm v3.10.5
npm ERR! code ELIFECYCLE

npm ERR! [email protected] postinstall: node script/build-options.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script 'node script/build-options.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the atom-beautify package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node script/build-options.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs atom-beautify
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls atom-beautify
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /tmp/apm-install-dir-1161018-10470-17v9gln/npm-debug.log
npm ERR! code 1

duplicate

Most helpful comment

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.

All 9 comments

Have you tried to install again? This could be that a dependency is missing or failed to download.

Hi I am receiving the same message. I am on windows 8.1 I have tried reinstalling and receive the same error again.
Error: Cannot find module 'event-kit' at Module._resolveFilename (module.js:455:15) at Module._resolveFilename (C:\Users\"userid"\AppData\Local\atom\app-1.12.5\resources\electron.asar\common\reset-search-paths.js:35:12) at Function.Module._resolveFilename (C:\Users\"userid"\AppData\Local\atom\app-1.12.5\resources\app.asar\src\module-cache.js:383:52) at Function.Module._load (module.js:403:25) at Module.require (module.js:483:17) at require (C:\Users\"userid"\AppData\Local\atom\app-1.12.5\resources\app.asar\src\native-compile-cache.js:50:27) at Object.<anonymous> (file:///C:/Users/"userid"/.atom/packages/atom-beautify-master/src/beautify.coffee:7:25) at Object.<anonymous> (file:///C:/Users/"userid"/.atom/packages/atom-beautify-master/src/beautify.coffee:2:1) at Module._compile (C:\Users\"userid"\AppData\Local\atom\app-1.12.5\resources\app.asar\src\native-compile-cache.js:103:30) at Object.value [as .coffee] (C:\Users\"userid"\AppData\Local\atom\app-1.12.5\resources\app.asar\src\compile-cache.js:201:21) at Module.load (module.js:473:32) at tryModuleLoad (module.js:432:12) at Function.Module._load (module.js:424:3) at Module.require (module.js:483:17) at require (C:\Users\"userid"\AppData\Local\atom\app-1.12.5\resources\app.asar\src\native-compile-cache.js:50:27) at Package.module.exports.Package.requireMainModule (C:\Users\"userid"\AppData\Local\atom\app-1.12.5\resources\app.asar\src\package.js:741:27) at Package.module.exports.Package.activateNow (C:\Users\"userid"\AppData\Local\atom\app-1.12.5\resources\app.asar\src\package.js:174:16) at C:\Users\"userid"\AppData\Local\atom\app-1.12.5\resources\app.asar\src\package.js:821:25 at Function.module.exports.Emitter.simpleDispatch (C:\Users\"userid"\AppData\Local\atom\app-1.12.5\resources\app.asar\node_modules\event-kit\lib\emitter.js:25:14) at Emitter.module.exports.Emitter.emit (C:\Users\"userid"\AppData\Local\atom\app-1.12.5\resources\app.asar\node_modules\event-kit\lib\emitter.js:129:28) at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (C:\Users\"userid"\AppData\Local\atom\app-1.12.5\resources\app.asar\src\command-registry.js:240:20) at CommandRegistry.handleCommandEvent (C:\Users\"userid"\AppData\Local\atom\app-1.12.5\resources\app.asar\src\command-registry.js:3:59) at CommandRegistry.module.exports.CommandRegistry.dispatch (C:\Users\"userid"\AppData\Local\atom\app-1.12.5\resources\app.asar\src\command-registry.js:160:19) at AtomEnvironment.module.exports.AtomEnvironment.dispatchApplicationMenuCommand (C:\Users\"userid"\AppData\Local\atom\app-1.12.5\resources\app.asar\src\atom-environment.js:1136:28) at EventEmitter.outerCallback (C:\Users\"userid"\AppData\Local\atom\app-1.12.5\resources\app.asar\src\application-delegate.js:319:25) at emitTwo (events.js:106:13) at EventEmitter.emit (events.js:191:7)

@dooley1023 Try this command from your console and let me know if this solved the problem:

apm install atom-beautify

i should have described what i was doing. i did use the apm install command to get it installed the first time which ran without failure. however when i try to use beautify i receive the message "failed to activate atom-beatify package." it then gives me the stack trace which i copied over. i did try uninstalling and reinstall with the apm command and manually dropping it in the packages folder and allowing atom to find the package itself both ways gives me the same failed to activate message.
just as a side note if it matters i am running a zwamp server which creates a virtual drive and runs apache 2.4 and php 5.2.4 as my dev environment.

I also get the cannot find module 'event-kit' after updating to the latest package.

Stack Trace:

Error: Cannot find module 'event-kit' at Module._resolveFilename (module.js:455:15) at Module._resolveFilename (/Applications/Atom.app/Contents/Resources/electron.asar/common/reset-search-paths.js:35:12) at Function.Module._resolveFilename (/Applications/Atom.app/Contents/Resources/app.asar/src/module-cache.js:383:52) at Function.Module._load (module.js:403:25) at Module.require (module.js:483:17) at require (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:50:27) at Object.<anonymous> (/Users/matthew.hillman/.atom/packages/atom-beautify/src/beautify.coffee:7:25) at Object.<anonymous> (/Users/matthew.hillman/.atom/packages/atom-beautify/src/beautify.coffee:2:1) at Module._compile (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:103:30) at Object.value [as .coffee] (/Applications/Atom.app/Contents/Resources/app.asar/src/compile-cache.js:201:21) at Module.load (module.js:473:32) at tryModuleLoad (module.js:432:12) at Function.Module._load (module.js:424:3) at Module.require (module.js:483:17) at require (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:50:27) at Package.module.exports.Package.requireMainModule (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:741:27) at Package.module.exports.Package.activateNow (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:174:16) at /Applications/Atom.app/Contents/Resources/app.asar/src/package.js:821:25 at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:25:14) at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:129:28) at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:240:20) at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:59 at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:587:16) at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:382:22) at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:106:36) at HTMLDocument.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:3:59)

So is there a solution? The linked search doesn't assist in resolving this issue.

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.

Thank you very much. I really didn't want to lose this package. Your hard work is greatly appreciated.

Was this page helpful?
0 / 5 - 0 ratings