akonwi / git-plus

vim-fugitive like package for atom. make commits and other git things without the terminal
MIT License
537 stars 163 forks source link

Uncaught TypeError: undefined is not a function #152

Closed herlon214 closed 9 years ago

herlon214 commented 9 years ago

After I update my git-plus the console is giving an error:

Uncaught TypeError: undefined is not a function /home/herlonaguiar/.atom/packages/git-plus/lib/views/status-view.coffee:38
module.exports.StatusView.initialize /home/herlonaguiar/.atom/packages/git-plus/lib/views/status-view.coffee:38
View /home/herlonaguiar/.atom/packages/git-plus/node_modules/atom-space-pen-views/node_modules/space-pen/lib/space-pen.js:184
StatusView /home/herlonaguiar/.atom/packages/git-plus/lib/views/status-view.coffee:14
exit /home/herlonaguiar/.atom/packages/git-plus/lib/git.coffee:133
BufferedProcess.triggerExitCallback /usr/share/atom/resources/app/src/buffered-process.js:52
(anonymous function) /usr/share/atom/resources/app/src/buffered-process.js:66
(anonymous function) /usr/share/atom/resources/app/src/buffered-process.js:105
emit events.js:129
(anonymous function) net.js:461
Uncaught TypeError: undefined is not a function /home/herlonaguiar/.atom/packages/git-plus/lib/views/git-palette-view.coffee:49
akonwi commented 9 years ago

Make sure the package is at the latest version and then run apm install in the package directory or from atom use the update packaged dependencies command

herlon214 commented 9 years ago

@akonwi, I tried what you said but the problem is still persists. I already uninstall the git-plus and install again, removed the folder from packages. Is this only happening with me?

akonwi commented 9 years ago

Are you still having this issue? I think you were the only one experiencing this.

mdunc commented 9 years ago

I just installed git-plus for the first time and get this error when trying to commit. The error directed me to this issue. TypeError: undefined is not a function at gitCmd.stderr (/Users/mark/.atom/packages/git-plus/lib/git.coffee:53:26) at Socket.<anonymous> (/Applications/Atom.app/Contents/Resources/app/src/buffered-process.js:137:13) at emitOne (events.js:77:13) at Socket.emit (events.js:166:7) at readableAddChunk (_stream_readable.js:146:16) at Socket.Readable.push (_stream_readable.js:109:10) at Pipe.onread (net.js:517:20)

carneeki commented 9 years ago

This is probably a separate cause, but results in the same error. Will open a new issue if the author wants.

I get same when running Atom in "1.0 API preview" (from command line: atom --one), however it is fine when just starting as usual (atom). Version was build from source, but same tag as v0.190.0.

[Enter steps to reproduce below:]

  1. Start atom with command line atom --one
  2. Open file
  3. Ctrl+Shift+P
  4. git-plus log
  5. Boom! Error.

Atom Version: 0.190.0-d9f0f23 System: linux 3.2.0-77-generic Thrown From: git-plus package, v4.4.11

Stack Trace

Uncaught TypeError: undefined is not a function

At /home/carneeki/.atom/packages/git-plus/lib/models/git-log.coffee:10

TypeError: undefined is not a function
    at amountOfCommitsToShow (/home/carneeki/.atom/packages/git-plus/lib/models/git-log.coffee:10:32)
    at gitLog (/home/carneeki/.atom/packages/git-plus/lib/models/git-log.coffee:19:77)
    at atom-workspace.<anonymous> (/home/carneeki/.atom/packages/git-plus/lib/git-plus.coffee:116:18)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app/src/command-registry.js:242:29)
    at /usr/share/atom/resources/app/src/command-registry.js:3:61
    at CommandPaletteView.module.exports.CommandPaletteView.confirmed (/usr/share/atom/resources/app/node_modules/command-palette/lib/command-palette-view.js:120:32)
    at CommandPaletteView.module.exports.SelectListView.confirmSelection (/usr/share/atom/resources/app/node_modules/atom-space-pen-views/lib/select-list-view.js:338:21)
    at space-pen-div.atom.commands.add.core:confirm (/usr/share/atom/resources/app/node_modules/atom-space-pen-views/lib/select-list-view.js:109:19)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app/src/command-registry.js:242:29)
    at /usr/share/atom/resources/app/src/command-registry.js:3:61

Commands

     -0:07.7 fuzzy-finder:toggle-file-finder (atom-text-editor.editor.is-focused)
     -0:05.1 editor:consolidate-selections (atom-text-editor.editor.mini)
     -0:05.1 core:cancel (atom-text-editor.editor.mini)
     -0:02.8 command-palette:toggle (atom-text-editor.editor.is-focused)
     -0:00.4 core:confirm (atom-text-editor.editor.mini)
     -0:00.4 git-plus:log (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "disabledPackages": [
      "pdf-view"
    ],
    "autoHideMenuBar": true,
    "themes": [
      "seti-ui",
      "seti-syntax"
    ]
  },
  "git-plus": {}
}

Installed Packages

# User
build, v0.27.0
git-plus, v4.4.11
keybinding-cheatsheet, v0.0.8
language-gcode, v0.1.1
language-gitignore, v0.1.1
language-latex, v0.4.1
minimap, v4.7.6
seti-syntax, v0.3.3
seti-ui, v0.6.3

# Dev
No dev packages
akonwi commented 9 years ago

@mdunc Your issue should have been fixed in the last update. @carneeki this seems to be something different. I've already started looking into it but you can open another issue for it if you'd like.

akonwi commented 9 years ago

@carneeki I just published an update that should fix the issue.

carneeki commented 9 years ago

I will test it now :)

On 9 April 2015 at 09:56, Akonwi Ngoh notifications@github.com wrote:

@carneeki https://github.com/carneeki I just published an update that should fix the issue.

— Reply to this email directly or view it on GitHub https://github.com/akonwi/git-plus/issues/152#issuecomment-91071590.

Adam "carneeki" Carmichael p: +61 415 37 1990 w: http://bigneek.com e: carneeki@carneeki.net i: 2207644

carneeki commented 9 years ago

Yep - confirmed fixed for me. Nice work @akonwi :+1:

kangw3n commented 9 years ago

Having same issues here today.

[Enter steps to reproduce below:]

  1. open atom and do some editing
  2. commit and push all using keymap : "'ctrl-shift-a p"
  3. atom will open a new commit_editmsg file instead of split window
  4. upon save, it produce a separate COMMIT_EDITMSG in my folder
  5. and for sure it does not commit nor push
  6. BOOMM...

Atom Version: 0.210.0 System: Microsoft Windows 7 ??? Thrown From: git-plus package, v5.1.7

Stack Trace

Uncaught TypeError: undefined is not a function

At C:\Users\udn\AppData\Local\atom\app-0.210.0\resources\app.asar\node_modules\q\q.js:128

TypeError: undefined is not a function
  at GitCommit.module.exports.GitCommit.splitPane (C:\Users\udn\.atom\packages\git-plus\lib\models\git-commit.coffee:105:5)
  at C:\Users\udn\.atom\packages\git-plus\lib\models\git-commit.coffee:80:30
  at _fulfilled (C:\Users\udn\AppData\Local\atom\app-0.210.0\resources\app.asar\node_modules\q\q.js:794:54)
  at self.promiseDispatch.done (C:\Users\udn\AppData\Local\atom\app-0.210.0\resources\app.asar\node_modules\q\q.js:823:30)
  at Promise.promise.promiseDispatch (C:\Users\udn\AppData\Local\atom\app-0.210.0\resources\app.asar\node_modules\q\q.js:756:13)
  at C:\Users\udn\AppData\Local\atom\app-0.210.0\resources\app.asar\node_modules\q\q.js:564:44
  at flush (C:\Users\udn\AppData\Local\atom\app-0.210.0\resources\app.asar\node_modules\q\q.js:110:17)
  at process._tickCallback (node.js:357:13)

Commands

     -7:33.8.0 git-plus:menu (atom-text-editor.editor.is-focused)
  3x -7:33.2.0 core:move-down (atom-text-editor.editor.mini.is-focused)
     -7:32.6.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -4:32.3.0 git-plus:menu (atom-text-editor.editor.is-focused)
  4x -4:02.1.0 core:save (atom-text-editor.editor.is-focused)
     -0:16 git-plus:add (atom-text-editor.editor.is-focused)
  2x -0:11.4.0 editor:copy-path (atom-text-editor.editor.is-focused)
  4x -0:07.2.0 git-plus:add (atom-text-editor.editor.is-focused)
     -0:07.0 git-plus:add-and-commit (atom-text-editor.editor.is-focused)

Config

{
  "core": {},
  "git-plus": {
    "openInPane": false
  }
}

Installed Packages

# User
angularjs, v0.3.0
atom-alignment, v0.12.1
atom-beautify, v0.28.5
autocomplete-paths, v1.0.2
color-picker, v2.0.7
editorconfig, v1.0.0
emmet, v2.3.10
file-icons, v1.5.7
git-plus, v5.1.7
javascript-snippets, v1.0.0
language-jade, v0.4.0
linter, v0.12.7
linter-csslint, v0.0.13
linter-jscs, v1.12.0
linter-jshint, v0.1.6
linter-scss-lint, v1.0.4
sass-autocompile, v0.7.1
Stylus, v1.0.0

# Dev
No dev packages