sindresorhus / atom-fixmyjs

[DEPRECATED] Automagically fix JSHint lint warnings
https://atom.io/packages/fixmyjs
MIT License
86 stars 5 forks source link

FixMyJS option disappears after first attempt #8

Closed Regaddi closed 9 years ago

Regaddi commented 9 years ago

Hi,

I just tried your package and the result is sobering. I've installed "linter-jshint" and "fixmyjs" and produced an error inside a JS file. I chose "FixMyJS" from the command options and... nothing happened. When I reenter "FixMyJS" I don't get a matching option, so I'm not able to "re-fix" ANY file.

An error occurs in the console:

Failed to activate package named 'fixmyjs' Error: Cannot find module 'fixmyjs'
  at Module._resolveFilename (module.js:351:15)
  at Function.Module._resolveFilename (/Applications/Atom.app/Contents/Resources/app/src/module-cache.js:383:52)
  at Function.Module._load (module.js:293:25)
  at Module.require (module.js:380:17)
  at require (module.js:399:17)
  at Object.<anonymous> (/Users/cstuff/.atom/packages/fixmyjs/index.js:2:15)
  at Module._compile (module.js:475:26)
  at Object.loadFile [as .js] (/Applications/Atom.app/Contents/Resources/app/src/6to5.js:138:21)
  at Module.load (module.js:370:32)
  at Function.Module._load (module.js:325:12)
  at Module.require (module.js:380:17)
  at require (module.js:399:17)
  at Package.module.exports.Package.requireMainModule (/Applications/Atom.app/Contents/Resources/app/src/package.js:651:34)
  at Package.module.exports.Package.activateConfig (/Applications/Atom.app/Contents/Resources/app/src/package.js:251:12)
  at Package.module.exports.Package.activateNow (/Applications/Atom.app/Contents/Resources/app/src/package.js:232:14)
  at /Applications/Atom.app/Contents/Resources/app/src/package.js:710:29
  at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:82:11)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:224:20)
  at /Applications/Atom.app/Contents/Resources/app/src/command-registry.js:3:61
  at CommandPaletteView.module.exports.CommandPaletteView.confirmed (/Applications/Atom.app/Contents/Resources/app/node_modules/command-palette/lib/command-palette-view.js:120:32)
  at CommandPaletteView.module.exports.SelectListView.confirmSelection (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-space-pen-views/lib/select-list-view.js:338:21)
  at space-pen-div.atom.commands.add.core:confirm (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-space-pen-views/lib/select-list-view.js:109:19)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:243:29)
  at /Applications/Atom.app/Contents/Resources/app/src/command-registry.js:3:61
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:558:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:396:22)
  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:176:20)

Any hints?

danielkoch commented 9 years ago

Got the same problem/error.

Trudko commented 9 years ago

Try going to .atom/packages/fixmyjs and run npm install

danielkoch commented 9 years ago

Thanks, works for me!

sindresorhus commented 9 years ago

Yup, this is a common npm race condition and unfortunately out of my control. Please do complain over at https://github.com/npm/npm/issues as I'm tired of having to deal with hundreds of these kinds of issue a week ;)