jacogr / atom-git-control

Not maintained :(
MIT License
227 stars 70 forks source link

Uncaught TypeError: Path must be a string. Received undefined #248

Open balen opened 6 years ago

balen commented 6 years ago

[Enter steps to reproduce:]

  1. Open git.control
  2. Click on the project icon to change project

Atom: 1.21.1 x64 Electron: 1.6.15 OS: Mac OS X 10.13 Thrown From: git-control package 0.9.0

Stack Trace

Uncaught TypeError: Path must be a string. Received undefined

At path.js:7

TypeError: Path must be a string. Received undefined
    at assertPath (path.js:7:11)
    at Object.resolve (path.js:1146:7)
    at _fn (/packages/git-control/lib/dialogs/project-dialog.coffee:33:44)
    at ProjectDialog.module.exports.ProjectDialog.activate (/packages/git-control/lib/dialogs/project-dialog.coffee:29:7)
    at GitControlView.module.exports.GitControlView.projectMenuClick (/packages/git-control/lib/git-control-view.coffee:147:20)
    at MenuView.module.exports.MenuView.click (/packages/git-control/lib/views/menu-view.coffee:50:7)
    at MenuItem.click (/packages/git-control/lib/views/menu-view.coffee:39:17)
    at /packages/merge-conflicts/node_modules/space-pen/lib/space-pen.js:231:38)
    at HTMLDivElement.dispatch (/packages/merge-conflicts/node_modules/jquery/dist/jquery.js:4435:9)
    at HTMLDivElement.elemData.handle (/packages/merge-conflicts/node_modules/jquery/dist/jquery.js:4121:28)

Commands

     -2:11.9.0 tree-view:show (atom-workspace.workspace.scrollbars-visible-when-scrolling)
     -2:08.7.0 git-control:toggle (atom-pane.pane)

Non-Core Packages

angularjs 0.4.0 
ariake-dark-syntax 0.1.3 
atom-material-syntax 1.0.7 
atom-material-syntax-dark 1.0.0 
atom-material-syntax-light 0.4.6 
atom-material-ui 2.0.6 
atom-typescript 11.0.10 
autoclose-html 0.23.0 
busy-signal 1.4.3 
code-peek 1.4.21 
dash 1.7.1 
docker 0.8.0 
duotone-dark-syntax 2.1.0 
expose 0.15.0 
file-icons 2.1.13 
flatwhite-syntax 0.8.1 
git-control 0.9.0 
git-time-machine 1.5.9 
gruvbox-plus-syntax 1.3.1 
highlight-selected 0.13.1 
indent-guide-improved 1.4.13 
intentions 1.1.5 
language-sql-mysql 0.3.1 
linter 2.2.0 
linter-docker 0.2.1 
linter-erb 1.1.0 
linter-sass-lint 1.8.2 
linter-tidy 2.3.1 
linter-ui-default 1.6.10 
merge-conflicts 1.4.5 
minimap 4.29.7 
minimap-git-diff 4.3.1 
multi-cursor 2.1.5 
nord-atom-ui 0.11.0 
pigments 0.40.2 
platformio-ide-terminal 2.7.0 
project-viewer 1.2.2 
todo 0.6.0 
todo-show 2.1.0 
tool-bar 1.1.0 
tool-bar-almighty 0.8.2 
tree-view-git-branch 0.1.2 
tree-view-git-status 1.4.0 
FelixFurtmayr commented 6 years ago

If you need to solve this manual, because my pull was not accepted right now - just copy a few lines into your file under .atom\packages\git-control\lib\dialogs\project-dialog.coffee from: https://github.com/jacogr/atom-git-control/pull/250/files

nelaaro commented 6 years ago

When are these going to pushed and when is the next release going out.

erik-icss commented 6 years ago

Even with these steps completed the error persists...

Uncaught TypeError: Path must be a string. Received undefined

path.js:7
Hide Stack Trace
TypeError: Path must be a string. Received undefined
    at assertPath (path.js:7:11)
    at Object.join (path.js:1211:7)
    at Object.isMerging (/home/erik/.atom/packages/git-control/lib/git.coffee:135:31)
    at GitControlView.module.exports.GitControlView.showSelectedFiles (/home/erik/.atom/packages/git-control/lib/git-control-view.coffee:137:72)
    at FileView.module.exports.FileView.showSelected (/home/erik/.atom/packages/git-control/lib/views/file-view.coffee:82:17)
    at FileView.module.exports.FileView.selectFile (/home/erik/.atom/packages/git-control/lib/views/file-view.coffee:136:6)
    at Object.select (/home/erik/.atom/packages/git-control/lib/views/file-view.coffee:97:27)
    at FileItem.select (/home/erik/.atom/packages/git-control/lib/views/file-view.coffee:20:11)
    at HTMLSpanElement.<anonymous> (/home/erik/.atom/packages/atom-mermaid/node_modules/space-pen/lib/space-pen.js:220:36)
    at HTMLSpanElement.dispatch (/home/erik/.atom/packages/atom-mermaid/node_modules/jquery/dist/jquery.js:4435:9)
    at HTMLSpanElement.elemData.handle (/home/erik/.atom/packages/atom-mermaid/node_modules/jquery/dist/jquery.js:4121:28)
Neffes1987 commented 6 years ago

try to change str 135 in .atom/packages/git-control/lib/git.coffee to

return fs.existsSync(path.join(repo.repo.workingDirectory, 'MERGE_HEAD'))