prrrnd / atom-git-projects

List and open your local Git projects in Atom.
MIT License
37 stars 18 forks source link

Uncaught SyntaxError: Unexpected token { #34

Closed lynxbyorion closed 9 years ago

lynxbyorion commented 9 years ago
  1. I am changed Root path in plugin settings. (root path contain many git and hg projects)
  2. Crashed after call 'Git projects: Toggle'.

Atom Version: 0.201.0 System: Mac OS X 10.10.3 Thrown From: git-projects package, v1.14.1

Stack Trace

Uncaught SyntaxError: Unexpected token {

At file:///Applications/Atom.app/Contents/Resources/app.asar/static/index.html#%7B%22locationsToOpen%22%3A%5B%7B%22pathToOpen%22%3Anull%7D%5D%2C%22bootstrapScript%22%3A%22%2FApplications%2FAtom.app%2FContents%2FResources%2Fapp.asar%2Fsrc%2Fwindow-bootstrap.js%22%2C%22resourcePath%22%3A%22%2FApplications%2FAtom.app%2FContents%2FResources%2Fapp.asar%22%2C%22devMode%22%3Afalse%2C%22safeMode%22%3Afalse%2C%22apiPreviewMode%22%3Afalse%2C%22appVersion%22%3A%220.201.0%22%2C%22shellLoadTime%22%3A5006%2C%22initialPaths%22%3A%5B%5D%7D:4

SyntaxError: Unexpected token {
  at Object.parse (native)
  at parseObject (/Users/lynx/.atom/packages/git-projects/node_modules/season/lib/cson.js:149:19)
  at parseContentsSync (/Users/lynx/.atom/packages/git-projects/node_modules/season/lib/cson.js:155:14)
  at Object.module.exports.readFileSync (/Users/lynx/.atom/packages/git-projects/node_modules/season/lib/cson.js:220:14)
  at Project.module.exports.Project.readConfigFile (/Users/lynx/.atom/packages/git-projects/lib/models/project.coffee:25:19)
  at new Project (/Users/lynx/.atom/packages/git-projects/lib/models/project.coffee:12:6)
  at /Users/lynx/.atom/packages/git-projects/lib/git-projects.coffee:127:25
  at /Users/lynx/.atom/packages/git-projects/node_modules/fs-plus/lib/fs-plus.js:369:21
  at FSReqWrap.oncomplete (fs.js:77:15)

Commands

     -2:07.8.0 command-palette:toggle (atom-text-editor.editor.vim-mode.command-mode.is-focused)
     -2:06.5.0 core:backspace (atom-text-editor.editor.mini.is-focused)
     -2:02.5.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -2:02.5.0 git-projects:toggle (atom-text-editor.editor.vim-mode.command-mode)
     -1:21.9.0 command-palette:toggle (atom-text-editor.editor.vim-mode.command-mode.is-focused)
     -1:19.3.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -1:19.3.0 git-projects:toggle (atom-text-editor.editor.vim-mode.command-mode)
     -0:34.2.0 editor:consolidate-selections (atom-text-editor.editor.mini.is-focused)
     -0:34.2.0 core:cancel (atom-text-editor.editor.mini.is-focused)
     -0:33.4.0 settings-view:open (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-base16-tomorrow-dark-theme.theme-atom-dark-ui)
 10x -0:20.5.0 core:move-right (atom-text-editor#git-projects.rootPath.editor.mini.is-focused)
     -0:14.4.0 core:backspace (atom-text-editor#git-projects.rootPath.editor.mini.is-focused)
     -0:10.1.0 pane:show-previous-item (atom-text-editor#git-projects.rootPath.editor.mini.is-focused)
     -0:06.5.0 command-palette:toggle (atom-text-editor.editor.vim-mode.command-mode.is-focused)
     -0:04.1.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:04.1.0 git-projects:toggle (atom-text-editor.editor.vim-mode.command-mode)

Config

{
  "core": {
    "themes": [
      "atom-dark-ui",
      "base16-tomorrow-dark-theme"
    ]
  },
  "git-projects": {
    "sortBy": "Latest modification date",
    "rootPath": "/Users/lynx/work/"
  }
}

Installed Packages

# User
file-icons, v1.5.5
git-log, v0.3.0
git-projects, v1.14.1
go-plus, v3.3.11
language-latex, v0.6.1
latex, v0.23.4
linter, v0.12.6
linter-clang, v2.25.1
linter-pep8, v0.2.0
markdown-table-formatter, v2.5.2
minimap, v4.9.0
project-manager, v1.15.7
script, v2.23.0
symbols-tree-view, v0.9.3
trailing-spaces, v0.2.5
vim-mode, v0.49.0

# Dev
No dev packages
prrrnd commented 9 years ago

Hi, thanks for reporting your issue. Can you make sure that you don't have any invalid .git-project file in any of the subfolders of your root paths?

lynxbyorion commented 9 years ago

After deleting ~/.atom and clear installing my list plugins, this trouble disappeared. Most likely this problem was the other.