muja / atom-math-selection

Replace selected text with evaluated version (using mathjs)
MIT License
0 stars 1 forks source link

Failed to activate the math-selection package #1

Open dantman opened 9 years ago

dantman commented 9 years ago

[Enter steps to reproduce below:]

  1. Select a math expression (I selected one in a php string)
  2. Trigger the math-selection:replace command.

Atom Version: 0.208.0 System: Mac OS X 10.9.5 Thrown From: math-selection package, v0.1.1

Stack Trace

Failed to activate the math-selection package

At Cannot read property 'eachEditorView' of undefined

TypeError: Cannot read property 'eachEditorView' of undefined
  at Object.module.exports.activate (/Users/daniel/.atom/packages/math-selection/lib/math-selection.coffee:32:23)
  at Package.module.exports.Package.activateNow (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:238:19)
  at /Applications/Atom.app/Contents/Resources/app.asar/src/package.js:770: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:219:20)
  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:177:20)

Commands

     -2:13.8.0 project-ring:toggle (atom-text-editor.editor.is-focused)
     -2:01.2.0 remote-ftp:connect (atom-text-editor.editor.is-focused)
     -0:03.1.0 math-selection:replace (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "themes": [
      "one-dark-ui",
      "base16-tomorrow-dark-theme"
    ],
    "disabledPackages": [
      "inline-autocomplete",
      "autocomplete",
      "linter-phpcs",
      "linter-phpmd",
      "remote-edit"
    ]
  }
}

Installed Packages

# User
Remote-FTP, v0.7.1
atom-alignment, v0.12.1
atom-jade, v0.3.0
auto-detect-indentation, v0.4.2
auto-update-packages, v1.0.0
docblockr, v0.7.2
indentation-indicator, v0.5.1
jsonlint, v1.1.2
language-apache, v1.3.0
language-javascript-better, v1.5.0
language-nginx, v0.5.3
language-puppet, v0.12.0
linter, v0.12.7
linter-jshint, v0.1.6
linter-jsxhint, v0.1.2
linter-php, v0.0.15
linter-puppet, v1.0.0
math-selection, v0.1.1
minimap, v4.10.0
project-manager, v1.15.10
project-ring, v0.20.9
trailing-spaces, v0.3.1

# Dev
No dev packages
muja commented 9 years ago

It seems the deprecated field workspaceView were removed in your version. I'll try to fix it in the upcoming days. Thanks for reporting!

abumalick commented 8 years ago

I have this kind of problem but it happens when activation the package: I get an error: 'Failed to activate the math-selection package' 'Cannot read property 'eachEditorView' of undefined' Stack Trace :

TypeError: Cannot read property 'eachEditorView' of undefined
    at Object.module.exports.activate (file:///C:/Users/abdul/.atom/packages/math-selection/lib/math-selection.coffee:32:23)
    at Package.module.exports.Package.activateNow (C:\Users\abdul\AppData\Local\atom\app-1.8.0\resources\app.asar\src\package.js:183:20)
    at C:\Users\abdul\AppData\Local\atom\app-1.8.0\resources\app.asar\src\package.js:156:32
    at Package.module.exports.Package.measure (C:\Users\abdul\AppData\Local\atom\app-1.8.0\resources\app.asar\src\package.js:92:15)
    at C:\Users\abdul\AppData\Local\atom\app-1.8.0\resources\app.asar\src\package.js:149:26
    at Package.module.exports.Package.activate (C:\Users\abdul\AppData\Local\atom\app-1.8.0\resources\app.asar\src\package.js:146:34)
    at PackageManager.module.exports.PackageManager.activatePackage (C:\Users\abdul\AppData\Local\atom\app-1.8.0\resources\app.asar\src\package-manager.js:538:21)
    at C:\Users\abdul\AppData\Local\atom\app-1.8.0\resources\app.asar\src\package-manager.js:342:19
    at C:\Users\abdul\AppData\Local\atom\app-1.8.0\resources\app.asar\src\config.js:631:20
    at Function.module.exports.Emitter.simpleDispatch (C:\Users\abdul\AppData\Local\atom\app-1.8.0\resources\app.asar\node_modules\event-kit\lib\emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (C:\Users\abdul\AppData\Local\atom\app-1.8.0\resources\app.asar\node_modules\event-kit\lib\emitter.js:125:28)
    at Config.module.exports.Config.emitChangeEvent (C:\Users\abdul\AppData\Local\atom\app-1.8.0\resources\app.asar\src\config.js:816:29)
    at Config.module.exports.Config.setRawValue (C:\Users\abdul\AppData\Local\atom\app-1.8.0\resources\app.asar\src\config.js:608:19)
    at Config.module.exports.Config.set (C:\Users\abdul\AppData\Local\atom\app-1.8.0\resources\app.asar\src\config.js:227:14)
    at Config.module.exports.Config.removeAtKeyPath (C:\Users\abdul\AppData\Local\atom\app-1.8.0\resources\app.asar\src\config.js:377:12)
    at Package.module.exports.Package.enable (C:\Users\abdul\AppData\Local\atom\app-1.8.0\resources\app.asar\src\package.js:77:26)
    at PackageManager.module.exports.PackageManager.enablePackage (C:\Users\abdul\AppData\Local\atom\app-1.8.0\resources\app.asar\src\package-manager.js:169:14)
    at HTMLButtonElement.<anonymous> (C:\Users\abdul\AppData\Local\atom\app-1.8.0\resources\app.asar\node_modules\settings-view\lib\package-card.js:328:27)
    at HTMLButtonElement.jQuery.event.dispatch (C:\Users\abdul\AppData\Local\atom\app-1.8.0\resources\app.asar\node_modules\jquery\dist\jquery.js:4435:9)
    at HTMLButtonElement.elemData.handle (C:\Users\abdul\AppData\Local\atom\app-1.8.0\resources\app.asar\node_modules\jquery\dist\jquery.js:4121:28)
rbecheras commented 7 years ago

Hi @muja,

any clue to help us to solve it ourself even if we don't know about APM system ?

muja commented 7 years ago

@rbecheras it's that the APIs changed. When I wrote this package it was still in Beta and now the eachEditorView method has been removed. When I looked over it, I couldn't find a replacement so I gave up.

Apparently there is a lot of demand for this package, so I will take a look into their new APIs and roll out a fix.

muja commented 7 years ago

This should be fixed now, works for me on the latest Atom. Can you confirm?