yomybaby / atom-titanium

[DEPRECATED] Atom package for Titanium Alloy
https://atom.io/packages/titanium-alloy
MIT License
49 stars 11 forks source link

Uncaught TypeError: path.relative is not a function #38

Closed vsantana closed 8 years ago

vsantana commented 8 years ago

[Enter steps to reproduce below:]

  1. Open all related files via keyboard shortcut. (ctrl+alt+a)

Atom Version: 1.7.4 System: Mac OS X 10.10.5 Thrown From: titanium-alloy package, v0.10.1

Stack Trace

Uncaught TypeError: path.relative is not a function

At /Users/vsantana/.atom/packages/titanium-alloy/lib/related.coffee:27

TypeError: path.relative is not a function
    at getRelatedFilePath (/Users/vsantana/.atom/packages/titanium-alloy/lib/related.coffee:27:20)
    at Object.module.exports.openAllFiles (/Users/vsantana/.atom/packages/titanium-alloy/lib/related.coffee:68:24)
    at atom-workspace.atom.commands.add.titanium:openAllRelatedFiles (/Users/vsantana/.atom/packages/titanium-alloy/lib/related.coffee:56:77)
    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:580:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:388:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:98:36)
    at HTMLDocument.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:3:61)

Commands

     -1:46.6.0 vim-mode-plus:delete-right (atom-text-editor.editor.vim-mode-plus.normal-mode.is-focused)
     -1:38.6.0 command-palette:toggle (atom-text-editor.editor.vim-mode-plus.is-focused.normal-mode)
     -1:38.4.0 blur (atom-text-editor.editor.vim-mode-plus.is-focused.normal-mode)
     -1:32.4.0 core:move-down (atom-text-editor.editor.mini.is-focused)
  6x -1:27.4.0 core:backspace (atom-text-editor.editor.mini.is-focused)
     -1:10.6.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -1:10.6.0 blur (atom-text-editor.editor.mini.is-focused)
     -1:10.6.0 titanium:openAllRelatedFiles (atom-text-editor.editor.vim-mode-plus.normal-mode)
  3x -1:03.8.0 blur (atom-text-editor.editor.vim-mode-plus.normal-mode.is-focused)
     -0:20.5.0 settings-view:show-keybindings (atom-text-editor.editor.vim-mode-plus.normal-mode.is-focused)
  5x -0:19.9.0 blur (atom-text-editor.editor.vim-mode-plus.normal-mode.is-focused)
  2x -0:16.4.0 core:backspace (atom-text-editor.editor.mini.is-focused)
     -0:08.7.0 blur (atom-text-editor.editor.mini.is-focused)
  2x -0:06.5.0 core:cancel (table.native-key-bindings.table.text)
  4x -0:04.3.0 blur (table.native-key-bindings.table.text)
     -0:00.7.0 titanium:openAllRelatedFiles (atom-text-editor.editor.vim-mode-plus.normal-mode.is-focused)

Config

{
  "core": {
    "disabledPackages": [
      "titanium-build",
      "multi-highlight-selected",
      "tidy-markdown",
      "ever-notedown",
      "markdown-preview-plus"
    ]
  },
  "titanium-alloy": {
    "defaultI18nLanguage": "pt"
  }
}

Installed Packages

# User
build, v0.63.0
build-make, v0.10.0
git-commit, v1.5.2
git-diff-details, v1.3.0
hyperclick, v0.0.36
indent-guide-improved, v1.4.8
jslint, v1.5.1
merge-conflicts, v1.4.2
minimap, v4.24.0
minimap-highlight-selected, v4.4.0
open-recent, v5.0.0
pigments, v0.26.3
titanium-alloy, v0.10.1
todo-show, v1.6.0
vim-mode-plus, v0.42.0

# Dev
No dev packages
yomybaby commented 8 years ago

Thanks for reporting. 😄 In my Macbook, it work properly (OS X 10.11.4 , Atom 1.7.4). Actually, path.relative is function of path module which is built in Nodejs. I don't know why you got this error. If you got this error right after install or upgrade Atom and/or package, Close atom completely and open again.

vsantana commented 8 years ago

Thanks for responding. I've figured out that the error only occurs after I fire ctrl+alt+shift+a to close all related files. After that, I always have got the error above.

yomybaby commented 8 years ago

Oh! There is a bug where you mentioned. New release is works properly.

Thanks for reporting with detail information. 👍