snowkit / atom-flow

atom.io support for haxe flow build tool
MIT License
6 stars 5 forks source link

Uncaught TypeError: Cannot read property 'mainModulePath' of undefined #2

Closed anissen closed 9 years ago

anissen commented 9 years ago
  1. Right-click project.flow file in tree view
  2. Select "Set as active flow file"
  3. Profit The following error

Atom Version: 0.187.0 System: Mac OS X 10.10 Thrown From: flow package, v0.1.0

Stack Trace

Uncaught TypeError: Cannot read property 'mainModulePath' of undefined

At /Users/nissen/.atom/packages/flow/lib/flow.js:137

TypeError: Cannot read property 'mainModulePath' of undefined
  at Object.module.exports.set_flow_file_from_treeview (/Users/nissen/.atom/packages/flow/lib/flow.js:137:40)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:246:29)
  at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:3:61)
  at CommandRegistry.module.exports.CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:159:19)
  at [object Object].jQuery.fn.trigger (/Applications/Atom.app/Contents/Resources/app/src/space-pen-extensions.js:64:23)
  at EventEmitter.<anonymous> (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:80:67)
  at EventEmitter.emit (events.js:119:17)
  at EventEmitter.ipc.sendSync (/Applications/Atom.app/Contents/Resources/atom.asar/renderer/api/lib/ipc.js:21:31)
  at BrowserWindow.RemoteMemberFunction [as emit] (/Applications/Atom.app/Contents/Resources/atom.asar/renderer/api/lib/remote.js:110:29)
  at ContextMenuManager.module.exports.ContextMenuManager.showForEvent (/Applications/Atom.app/Contents/Resources/app/src/context-menu-manager.js:172:33)
  at HTMLDocument.<anonymous> (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:153:33)
  at HTMLDocument.handler (/Applications/Atom.app/Contents/Resources/app/src/space-pen-extensions.js:112:34)
  at HTMLDocument.jQuery.event.dispatch (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4681:9)
  at HTMLDocument.elemData.handle (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4359:46)

Commands

     -2:40.0 settings-view:check-for-package-updates (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-base16-tomorrow-dark-theme.theme-atom-dark-ui)
     -1:24.1 editor:newline (atom-text-editor.editor)
     -1:18.1 autocomplete-plus:confirm (input.hidden-input)
     -1:13.9 editor:select-to-first-character-of-line (atom-text-editor.editor)
     -1:10.8 grammar-selector:show (atom-text-editor.editor)
     -1:06.6 editor:consolidate-selections (atom-text-editor.editor.mini)
     -1:06.6 core:cancel (atom-text-editor.editor.mini)
     -0:48.7 core:copy (atom-notification.fatal.icon.icon-bug.native-key-bindings.has-detail.has-close.has-stack.remove)

Config

{
  "core": {
    "disabledPackages": [
      "autocomplete",
      "wrap-guide",
      "autoflow",
      "tabs",
      "tree-view"
    ],
    "themes": [
      "atom-dark-ui",
      "base16-tomorrow-dark-theme"
    ]
  }
}

Installed Packages

# User
Search, v0.4.0
atom-alignment, v0.11.0
autocomplete-haxe, v0.2.0
autocomplete-plus, v2.4.2
file-icons, v1.5.1
flow, v0.1.0
git-log, v0.3.0
git-tab-status, v1.5.3
highlight-line, v0.10.1
irc, v0.2.9
jshint, v1.3.0
language-haxe, v0.2.1
open-last-project, v0.3.4
project-manager, v1.15.5
sublime-tabs, v0.5.0
tabs-to-spaces, v0.8.1
terminal-status, v1.3.5
trailing-spaces, v0.2.4
zentabs, v0.8.2

# Dev
No dev packages
ruby0x1 commented 9 years ago

Are you installing from the published versions or from git?

ruby0x1 commented 9 years ago

(also try update to the latest version of haxe(0.3.0) + flow package(0.2.1))

anissen commented 9 years ago

I also got the same error running with the latest versions of haxe and flow packages. However, I found the bug to be related to https://github.com/ddavison/sublime-tabs. The sublime-tabs package disables the core tree view and substitutes it with its own. Disabling sublime-tabs fixes this bug.

ruby0x1 commented 9 years ago

hmmmm the benefits of hackable tools, basic functionality fragmentation! I'll file a new issue for relying only on this tree view if it exists.