Loading a package after git clone fails


I tried to modify a package on which the original author is inactive for long in order to implement what I want. I first did the following.

$ apm disable language-latex
$ cd ~/work/atom
$ git clone git@github.com:area/language-latex.git
$ mv language-latex language-tex
$ cd language-tex
# edit package.json to initialize as a new package
$ git diff package.json
diff --git a/package.json b/package.json
index 60b6c78..c1d38dd 100644
--- a/package.json
+++ b/package.json
@@ -1,8 +1,8 @@
-  "name": "language-latex",
-  "version": "0.6.1",
+  "name": "language-tex",
+  "version": "0.1.0",
   "private": true,
-  "description": "Syntax highlighting for LaTeX for Atom",
+  "description": "Atom syntax highlight for TeX and its major macro packages",
   "repository": "https://github.com/area/language-latex",
   "license": "MIT",
   "engines": {
$ apm link .

Then, I invoked Atom and it said “Failed to load the language-tex package” with a message below.

Unexpected string in /Users/yudai-nkt/.atom/package

SyntaxError: Unexpected string
    at Object.parse (native)
    at parseObject (/Applications/Atom.app/Contents
    at parseContentsSync (/Applications/Atom.app/Co
    at Object.module.exports.readFileSync (/Applica
    at PackageManager.module.exports.PackageManager
.loadPackageMetadata (/Applications/Atom.app/Conten
    at PackageManager.module.exports.PackageManager
.loadPackage (/Applications/Atom.app/Contents/Resou
    at /Applications/Atom.app/Contents/Resources/ap
    at Config.module.exports.Config.transact (/Appl
    at PackageManager.module.exports.PackageManager
.loadPackages (/Applications/Atom.app/Contents/Reso
    at /Applications/Atom.app/Contents/Resources/ap
  at /Users/yudai-nkt/.atom/packages/language-tex/p

I guess the last line’s at /Users/yudai-nkt/.atom/packages/language-tex/package.json:1:1 is saying the first character of the first line of language-tex's package.json triggers the error, but I didn’t edit that place as you can see in the result of git diff package.json. I have no idea about the rest of the log neither.

How can I load my language-tex successfully and move on to the tweak?

Note that my environment is as follows:

  • OS: OS X El Capitan 10.11.4
  • Atom: Version 1.8.0


Rather than show a diff, could you show the actual contents of the package.json file? It would make diagnosing things a lot easier :grinning:


Sorry for the insufficient information (I intended to state I didn’t do anything wierd by showing the diff). Anyway, the whole package.json is:

  "name": "language-tex",
  "version": "0.1.0",
  "private": true,
  "description": "Atom syntax highlight for TeX and its major macro packages",
  "repository": "https://github.com/area/language-latex",
  "license": "MIT",
  "engines": {
  "atom": ">0.50.0"
  "dependencies": {}
"keywords": [


It’s malformed because you have the dangling:

"keywords": [

at the end. If you delete that for now, it should work ok.


It settles the problem and I can also include the keyword(s) entry inside the brace, thakns. I now wonder why the original has such kind of bad json file though.