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

Cannot read property 'command' of undefined #9

Open
eschwartz opened this issue Jun 26, 2015 · 2 comments
Open

Cannot read property 'command' of undefined #9

eschwartz opened this issue Jun 26, 2015 · 2 comments

Comments

@eschwartz
Copy link

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
Copy link
Author

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

@esiqveland
Copy link

Is this project dead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants