atom-haskell-archive / haskell-ghc-mod

haskell-ghc-mod atom package
https://atom.io/packages/haskell-ghc-mod
MIT License
69 stars 20 forks source link

Uncaught TypeError: Cannot read property 'browse' of null #75

Closed kmein closed 8 years ago

kmein commented 8 years ago
  1. Installed new haskell-ghc-mod package.
  2. Saving caused the following error. (Type/Info tooltips still work).

Atom Version: 1.3.2 System: Ubuntu 14.04 Thrown From: haskell-ghc-mod package, v1.2.5

Stack Trace

Uncaught TypeError: Cannot read property 'browse' of null

At /usr/share/atom/resources/app.asar/src/pane.js:829

TypeError: Cannot read property 'browse' of null
    at GhcModiProcess.module.exports.GhcModiProcess.queueCmd (/home/kmein/.atom/packages/haskell-ghc-mod/lib/ghc-modi-process.coffee:13:3)
    at GhcModiProcess.queueCmd (/home/kmein/.atom/packages/haskell-ghc-mod/lib/ghc-modi-process.coffee:1:1)
    at GhcModiProcess.module.exports.GhcModiProcess.runBrowse (/home/kmein/.atom/packages/haskell-ghc-mod/lib/ghc-modi-process.coffee:119:15)
    at GhcModiProcess.runBrowse (/home/kmein/.atom/packages/haskell-ghc-mod/lib/ghc-modi-process.coffee:1:1)
    at ModuleInfo.module.exports.ModuleInfo.update (/home/kmein/.atom/packages/haskell-ghc-mod/lib/module-info.coffee:45:16)
    at ModuleInfo.update (/home/kmein/.atom/packages/haskell-ghc-mod/lib/module-info.coffee:1:1)
    at /home/kmein/.atom/packages/haskell-ghc-mod/lib/module-info.coffee:66:10
    at Emitter.module.exports.Emitter.emit (/usr/share/atom/resources/app.asar/node_modules/event-kit/lib/emitter.js:86:11)
    at TextBuffer.module.exports.TextBuffer.saveAs (/usr/share/atom/resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:1060:27)
    at TextBuffer.module.exports.TextBuffer.save (/usr/share/atom/resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:1030:19)
    at TextEditor.module.exports.TextEditor.save (/usr/share/atom/resources/app.asar/src/text-editor.js:588:26)
    at Pane.module.exports.Pane.saveItem (/usr/share/atom/resources/app.asar/src/pane.js:534:18)
    at Pane.module.exports.Pane.saveActiveItem (/usr/share/atom/resources/app.asar/src/pane.js:517:19)
    at Workspace.module.exports.Workspace.saveActivePaneItem (/usr/share/atom/resources/app.asar/src/workspace.js:633:35)
    at atom-workspace.commandRegistry.add.core:save (/usr/share/atom/resources/app.asar/src/register-default-commands.js:173:32)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app.asar/src/command-registry.js:260:29)
    at /usr/share/atom/resources/app.asar/src/command-registry.js:3:61
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/usr/share/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:536:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/usr/share/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:359:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeydown (/usr/share/atom/resources/app.asar/src/window-event-handler.js:97:36)
    at HTMLDocument.<anonymous> (/usr/share/atom/resources/app.asar/src/window-event-handler.js:3:61)

Commands

     -1:39.4.0 ide-haskell:prettify-file (atom-text-editor.editor.is-focused)
     -1:33.7.0 core:backspace (atom-text-editor#atom-alignment.alignmentSpaceChars.editor.mini.is-focused)
     -1:33.6.0 core:delete (atom-text-editor#atom-alignment.alignmentSpaceChars.editor.mini.is-focused)
     -1:30.7.0 core:backspace (atom-text-editor#atom-alignment.alignBy.editor.mini.is-focused)
  2x -1:26.4.0 core:save (atom-text-editor#atom-alignment.alignmentSpaceChars.editor.mini.is-focused)
     -1:22.9.0 ide-haskell:prettify-file (atom-text-editor.editor.is-focused)
     -1:20.5.0 core:save (atom-text-editor.editor.is-focused)
     -1:20.5.0 ide-haskell:prettify-file (atom-text-editor.editor.is-focused)
  3x -1:13.5.0 core:backspace (atom-text-editor#atom-alignment.alignBy.editor.mini.is-focused)
     -1:08.1.0 core:save (atom-text-editor.editor.is-focused)
     -1:08.1.0 ide-haskell:prettify-file (atom-text-editor.editor.is-focused)
     -1:06.7.0 core:save (atom-text-editor.editor.is-focused)
     -1:06.7.0 ide-haskell:prettify-file (atom-text-editor.editor.is-focused)
  2x -0:49.4.0 core:paste (atom-text-editor#atom-alignment.alignBy.editor.mini.is-focused)
  2x -0:07.7.0 core:save (atom-text-editor.editor.is-focused)
     -0:01.0 ide-haskell:prettify-file (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "themes": [
      "one-light-ui",
      "one-light-syntax"
    ],
    "disabledPackages": [
      "haskell-pointfree"
    ]
  },
  "haskell-ghc-mod": {
    "additionalPathDirectories": [
      "/home/kmein/.cabal/bin/"
    ],
    "debug": true
  }
}

Installed Packages

# User
atom-alignment, v0.12.1
autocomplete-haskell, v0.6.2
emmet, v2.3.17
haskell-ghc-mod, v1.2.5
ide-haskell, v1.3.7
ide-haskell-cabal, v1.0.0
ionide-fsharp, v1.5.0
language-haskell, v1.5.1
language-latex, v0.6.1
language-lua, v0.9.4
minimap, v4.18.4

# Dev
No dev packages
lierdakil commented 8 years ago

a) try restarting Atom b) try uninstalling and reinstalling haskell-ghc-mod

this looks like package installation/update issue.

kmein commented 8 years ago

Thanks! Restarting helped.

There is however now the Error: spawn stylish-haskell ENOENT. haskell-ghc-mod however knows where my executable is.

lierdakil commented 8 years ago

stylish-haskell is handled by ide-haskell. Make sure to specify full path to executable in its settings.

kmein commented 8 years ago

Great, everything works now.