LinusU / node-appdmg

💾 Generate your app dmgs
MIT License
1.68k stars 152 forks source link

Unknown Syntax issue at position 13 #153

Closed Unshackle8078 closed 6 years ago

Unshackle8078 commented 6 years ago

Not sure what position 13 is - could be many things.

Syntax checks out as far as I can tell - practically identical to the example:

{
  "title": “Project Name",
  "icon": “../../ICON.icns",
  "background": "Background.png",
  "icon-size": 80,
  "contents": [
    { "x": 448, "y": 115, "type": "link", "path": "/Applications" },
    { "x": 192, "y": 115, "type": "file", "path": "../../Project Name.app" }
  ]
}
[ 1/21] Looking for target...                [ OK ]
[ 2/21] Reading JSON Specification...        [ OK ]
[ 3/21] Parsing JSON Specification...        [FAIL]
[ 4/21] Removing target image...             [ OK ]

SyntaxError: Unexpected token “ in JSON at position 13
    at JSON.parse (<anonymous>)
    at Object.fn (/usr/local/lib/node_modules/appdmg/lib/appdmg.js:118:24)
    at Pipeline._runStep (/usr/local/lib/node_modules/appdmg/lib/pipeline.js:46:10)
    at Pipeline._run (/usr/local/lib/node_modules/appdmg/lib/pipeline.js:94:10)
    at next (/usr/local/lib/node_modules/appdmg/lib/pipeline.js:35:25)
    at /usr/local/lib/node_modules/appdmg/lib/appdmg.js:105:9
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:511:3)

SyntaxError: Unexpected token “ in JSON at position 13

All the paths check out also.

LinusU commented 6 years ago

It seems like some of your quotation marks are not the expected ", but rather

Unshackle8078 commented 6 years ago

Wow... Derp - that did the trick. Must be that apple decided to use a different quote as my normal keyboard can't create the same non-italicized variation.

And the 13 was counting from the top of the file including white spaces - got it.