2
votes

I have a work development machine that is not connected to the internet. I'm using atom as my editor and cannot install packages as one normally would. I downloaded the package on another machine and extracted the package to ~/.atom/packages. The package, atom-beautify, shows up under the packages tab but I receive this error message when attempting to use it:

Error: Cannot find module 'event-kit'
    at Module._resolveFilename (module.js:338:15)
    at Function.Module._resolveFilename (C:\Users\quentin.goehrig.RD\AppData\Local\atom\app-1.7.4\resources\app.asar\src\module-cache.js:383:52)
    at Function.Module._load (module.js:289:25)
    at Module.require (module.js:366:17)
    at require (C:\Users\quentin.goehrig.RD\AppData\Local\atom\app-1.7.4\resources\app.asar\src\native-compile-cache.js:50:27)
    at Object.<anonymous> (file:///C:/Users/quentin.goehrig.RD/.atom/packages/atom-beautify-master/src/beautify.coffee:7:25)
    at Object.<anonymous> (file:///C:/Users/quentin.goehrig.RD/.atom/packages/atom-beautify-master/src/beautify.coffee:2:1)
    at Module._compile (C:\Users\quentin.goehrig.RD\AppData\Local\atom\app-1.7.4\resources\app.asar\src\native-compile-cache.js:103:30)
    at Object.defineProperty.value [as .coffee] (C:\Users\quentin.goehrig.RD\AppData\Local\atom\app-1.7.4\resources\app.asar\src\compile-cache.js:208:21)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:313:12)
    at Module.require (module.js:366:17)
    at require (C:\Users\quentin.goehrig.RD\AppData\Local\atom\app-1.7.4\resources\app.asar\src\native-compile-cache.js:50:27)
    at Package.module.exports.Package.requireMainModule (C:\Users\quentin.goehrig.RD\AppData\Local\atom\app-1.7.4\resources\app.asar\src\package.js:715:27)
    at Package.module.exports.Package.activateNow (C:\Users\quentin.goehrig.RD\AppData\Local\atom\app-1.7.4\resources\app.asar\src\package.js:173:16)
    at C:\Users\quentin.goehrig.RD\AppData\Local\atom\app-1.7.4\resources\app.asar\src\package.js:795:25
    at Function.module.exports.Emitter.simpleDispatch (C:\Users\quentin.goehrig.RD\AppData\Local\atom\app-1.7.4\resources\app.asar\node_modules\event-kit\lib\emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (C:\Users\quentin.goehrig.RD\AppData\Local\atom\app-1.7.4\resources\app.asar\node_modules\event-kit\lib\emitter.js:125:28)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (C:\Users\quentin.goehrig.RD\AppData\Local\atom\app-1.7.4\resources\app.asar\src\command-registry.js:241:20)
    at CommandRegistry.handleCommandEvent (C:\Users\quentin.goehrig.RD\AppData\Local\atom\app-1.7.4\resources\app.asar\src\command-registry.js:3:61)
    at CommandRegistry.module.exports.CommandRegistry.dispatch (C:\Users\quentin.goehrig.RD\AppData\Local\atom\app-1.7.4\resources\app.asar\src\command-registry.js:160:19)
    at AtomEnvironment.module.exports.AtomEnvironment.dispatchApplicationMenuCommand (C:\Users\quentin.goehrig.RD\AppData\Local\atom\app-1.7.4\resources\app.asar\src\atom-environment.js:1100:28)
    at EventEmitter.outerCallback (C:\Users\quentin.goehrig.RD\AppData\Local\atom\app-1.7.4\resources\app.asar\src\application-delegate.js:314:25)
    at emitTwo (events.js:87:13)
    at EventEmitter.emit (events.js:172:7)

The error was thrown from the atom-beautify package.

I have tried running apm install but I have had no luck there. Any help would be greatly appreciated!

apm -v
apm 1.9.2
npm 2.13.3
node 0.10.40
python 3.5.1
git 1.9.4.mysgit.2
visual studio
2
Did you run apm install inside the atom-beautify folder?idleberg
Yeah, I should have included the error message in the original post. The error message is this: gyp info it worked if it ends with ok gyp info using [email protected] gyp info using [email protected] | win32 | ia32 gyp http GET gttps://atom.io/download/atom-shell/v0.36.8/node-v0.36.8.tar.gz gyp WARN install got an error, rolling back install gypqgoehrig

2 Answers

2
votes

The procedure should be as follows(take atom-beautify for example):

  1. Download the package atom-beautify zip file on GitHub;
  2. Extract the package and put the folder into the folder ~/.atom/packages;
  3. Come to the direction ~/.atom/packages/atom-beautify;
  4. use the command:npm install.

Or you can install the package from the very beginning directly by using the command:

apm install atom-beautify

apm do the job from downloading to installing.


0
votes

You can directly use the atom package installer from settings. That's the simplest way to get any package installed & enabled.