atom-node-resolver icon indicating copy to clipboard operation
atom-node-resolver copied to clipboard

Cannot read property 'command' of undefined

Open eschwartz opened this issue 9 years ago • 2 comments

I just downloaded Atom v1.0.0, and tried to use this package. I moved the cursor to a require statements, and selected the "Open Selected Dependency" command. Here's the error I got:

Atom Version: 1.0.0 System: Mac OS X 10.10.2 Thrown From: node-resolver package, v1.0.1

Stack Trace

Failed to activate the node-resolver package

At Cannot read property 'command' of undefined

TypeError: Cannot read property 'command' of undefined
  at Object.exports.activate (/Users/edanschwartz/.atom/packages/node-resolver/index.js:12:21)
  at Package.module.exports.Package.activateNow (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:240:19)
  at /Applications/Atom.app/Contents/Resources/app.asar/src/package.js:772:25
  at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:222:20)
  at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
  at CommandPaletteView.module.exports.CommandPaletteView.confirmed (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/command-palette/lib/command-palette-view.js:159:32)
  at CommandPaletteView.module.exports.SelectListView.confirmSelection (/Applications/Atom.app/Contents/Resources/app.asar/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.asar/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.asar/src/command-registry.js:241:29)
  at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:520:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:355:22)
  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:180:20)

Commands

     -0:05.1.0 command-palette:toggle (atom-text-editor.editor.is-focused)
     -0:00.6.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:00.6.0 node-resolver:open-selected-dependencies (atom-text-editor.editor)

Config

{
  "core": {}
}

Installed Packages

# User
.bin, vundefined
atom-typescript, v4.6.9
autocomplete-modules, v1.0.0
linter, v1.0.6
node-resolver, v1.0.1

# Dev
No dev packages

eschwartz avatar Jun 26 '15 13:06 eschwartz

I found this in the "Deprecation Cop", maybe it's relevant:

Use activationCommands instead of activationEvents in your package.json Commands should be grouped by selector as follows:

  "activationCommands": {
    "atom-workspace": ["foo:bar", "foo:baz"],
    "atom-text-editor": ["foo:quux"]
  }
Report Issue
Package.getActivationCommands - /Applications/Atom.app/Contents/Resources/app.asar/src/package.js:808:9
Package.hasActivationCommands - /Applications/Atom.app/Contents/Resources/app.asar/src/package.js:733:20
<unknown> - /Applications/Atom.app/Contents/Resources/app.asar/src/package.js:187:24
Package.measure - /Applications/Atom.app/Contents/Resources/app.asar/src/package.js:165:15
Package.load - /Applications/Atom.app/Contents/Resources/app.asar/src/package.js:179:12
PackageManager.loadPackage - /Applications/Atom.app/Contents/Resources/app.asar/src/package-manager.js:372:14

eschwartz avatar Jun 26 '15 13:06 eschwartz

Is this project dead?

esiqveland avatar Jul 10 '15 10:07 esiqveland