JunoLab / atom-ink

IDE toolkit for Atom
MIT License
228 stars 40 forks source link

Uncaught TypeError: Cannot read property 'editor' of undefined #40

Closed paupereira closed 7 years ago

paupereira commented 8 years ago

I just installed Atom, and the packages julia-client, ink, and julia-language. When I open a new Julia console I'm unable to run any command. When hitting enter a blinking blue bar appears and without any output being displayed. The last time I tried to run something in the console I got the following error message.

Atom Version: 1.5.4 System: Mac OS X 10.11.3 Thrown From: ink package, v0.4.0

Stack Trace

Uncaught TypeError: Cannot read property 'editor' of undefined

At /Users/paupereira/.atom/packages/ink/lib/console/console.coffee:219

TypeError: Cannot read property 'editor' of undefined
    at Console.module.exports.Console.logInput (/Users/paupereira/.atom/packages/ink/lib/console/console.coffee:219:6)
    at Object.module.exports.eval (/Users/paupereira/.atom/packages/julia-client/lib/runtime/console.coffee:62:8)
    at /Users/paupereira/.atom/packages/julia-client/lib/runtime/console.coffee:42:23
    at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:125:28)
    at Console.module.exports.Console.eval (/Users/paupereira/.atom/packages/ink/lib/console/console.coffee:118:16)
    at atom-text-editor.subs.add.atom.commands.add.console:evaluate (/Users/paupereira/.atom/packages/ink/lib/console/console.coffee:14:9)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:260: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:570:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:378:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeydown (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:97:36)
    at HTMLDocument.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:3:61)

Commands

     -2:51.9.0 julia-client:kill-julia (div.package-detail.panels-item)
     -2:50.5.0 core:confirm (div.package-detail.panels-item)
     -2:50 command-palette:toggle (div.package-detail.panels-item)
 20x -2:47.6.0 core:move-down (atom-text-editor.editor.mini.is-focused)
     -2:22.8.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -2:22.8.0 julia-client:open-console (div.package-detail.panels-item)
  5x -2:13.6.0 julia-client:evaluate-and-move (atom-text-editor.editor.is-focused)
  2x -2:05.9.0 core:move-up (atom-text-editor.editor.is-focused)
     -1:22.8.0 julia:open-startup-file (atom-text-editor.editor.is-focused)
     -0:58.1.0 julia-client:kill-julia (atom-text-editor.editor.is-focused)
     -0:54.2.0 julia-client:start-julia (atom-text-editor.editor.is-focused)
     -0:46.7.0 julia-client:interrupt-julia (atom-text-editor.editor.is-focused)
     -0:38.3.0 julia-client:settings (atom-text-editor.editor.is-focused)
     -0:22.5.0 julia-client:interrupt-julia (atom-text-editor.editor.is-focused)
     -0:10.6.0 julia-client:kill-julia (atom-text-editor.editor.is-focused)
     -0:00.9.0 console:evaluate (atom-text-editor.editor.is-focused)

Config

{
  "core": {}
}

Installed Packages

# User
indent-detective, v0.1.0
ink, v0.4.0
julia-client, v0.4.0
language-julia, v0.5.0
latex-completions, v0.3.1

# Dev
No dev packages
pfitzseb commented 8 years ago

Did you install Atom.jl in Julia per the install instructions?

paupereira commented 8 years ago

I did. I also added Julia to the path in the julia-client settings.

MikeInnes commented 8 years ago

Have you been able to reproduce this error since? If not we might not be able to do much about it. If you completely restart Atom, open the devtools, and then try to execute something in the console, what happens?

saulkato commented 8 years ago

I had the exact same problem: non-reponsive console then error. I suspect it might have had to do with the order of installation, which in my case was julia-language, then julia-client, then ink. Within atom, I uninstalled and reinstalled julia-client and then it worked. Perhaps ink needs to be installed before julia-client.

MikeInnes commented 8 years ago

julia-client should give you a notification / error if ink isn't installed – but perhaps that's something we need to test more thoroughly.

lewisl commented 8 years ago

Still happens.

blegat commented 8 years ago

I have just had this error. I installed uber-juno and then julia-client<

balikezir commented 8 years ago

I've got the same error

DNF2 commented 7 years ago

I am getting the same error today with the release version of Julia 0.5. However, the code does execute correctly, I just get the red popup.

I did have some problems installing Juno, though. I installed Uber-Juno, but that did not trigger installation of Julia-client or ink, so I had to do that manually. Atom.jl is also installed.

pfitzseb commented 7 years ago

Pretty sure this has been fixed some time in the last half year -- please reopen if not.

szymonk211 commented 7 years ago

I have similar problem as @ppau1 Uncaught TypeError: Cannot read property 'editor' of undefined

Stack trace: TypeError: Cannot read property 'editor' of undefined at Console.moveHistory (/home/szymon/.atom/packages/ink/lib/console/console.js:370:16) at Console.next (/home/szymon/.atom/packages/ink/lib/console/console.js:391:17) at HTMLButtonElement.onclick (/home/szymon/.atom/packages/ink/lib/console/console.js:98:70) From: /home/szymon/.atom/packages/ink/lib/console/console.js:370

I am running Atom 1.19.0 on Ubuntu 16.04 with Julia 0.6

When i try to run any Julia code from atom command line, progress bar appears in lower left corner, and stays there endless.. I tried different orders of installation for julia-client and uber-juno, reinstalling and updating, but I couldn't run any Julia command in Atom.

pfitzseb commented 7 years ago

What version of ink do you have installed?

szymonk211 commented 7 years ago

0.7.4, freshly installed atom

pfitzseb commented 7 years ago

Fixed by https://github.com/JunoLab/atom-ink/commit/9e06711f4b252fb75a491a85e09f2a930fb4d2fc.