Tsd: SyntaxError: ์˜ˆ๊ธฐ์น˜ ์•Š์€ ํ† ํฐ t

์— ๋งŒ๋“  2015๋…„ 11์›” 10์ผ  ยท  9์ฝ”๋ฉ˜ํŠธ  ยท  ์ถœ์ฒ˜: DefinitelyTyped/tsd

tsd.json ํŒŒ์ผ์—์„œ unexpected token t ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•˜๋ฉด tsd install ๋ฅผ ํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.

[ERR!] cwd  : /Users/laszlo.gyulai/repos/workspaces-webapp
[ERR!] os   : Darwin 14.5.0
[ERR!] argv : "/usr/local/bin/node" "/Users/laszlo.gyulai/npm-global/bin/tsd" "install"
[ERR!] node : v4.2.2
[ERR!] tsd  : 0.6.5
[ERR!] Error: Unexpected token t
[ERR!] CODE : undefined
[ERR!] Unexpected token t
[ERR!] If you need help, you may report this error at:
    https://github.com/DefinitelyTyped/tsd/issues

[ERR!] 
SyntaxError: Unexpected token t
    at Object.parse (native)
    at parseJson (/Users/laszlo.gyulai/npm-global/lib/node_modules/tsd/build/xm/fileIO.js:30:21)
    at Object.readJSONSync (/Users/laszlo.gyulai/npm-global/lib/node_modules/tsd/build/xm/fileIO.js:41:12)
    at Context.stackSettings (/Users/laszlo.gyulai/npm-global/lib/node_modules/tsd/build/tsd/context/Context.js:34:44)
    at new Context (/Users/laszlo.gyulai/npm-global/lib/node_modules/tsd/build/tsd/context/Context.js:19:14)
    at getContext (/Users/laszlo.gyulai/npm-global/lib/node_modules/tsd/build/tsd/CLI.js:65:23)
    at /Users/laszlo.gyulai/npm-global/lib/node_modules/tsd/build/tsd/CLI.js:85:20
    at tryCatch1 (/Users/laszlo.gyulai/npm-global/lib/node_modules/tsd/node_modules/bluebird/js/main/util.js:63:19)
    at Promise$_callHandler [as _callHandler] (/Users/laszlo.gyulai/npm-global/lib/node_modules/tsd/node_modules/bluebird/js/main/promise.js:695:13)
    at Promise$_settlePromiseFromHandler [as _settlePromiseFromHandler] (/Users/laszlo.gyulai/npm-global/lib/node_modules/tsd/node_modules/bluebird/js/main/promise.js:711:18)

[ERR!] tsd.json: {"version":"v4","repo":"borisyankov/DefinitelyTyped","ref":"master","path":"typings","bundle":"typings/tsd.d.ts","installed":{"jquery/jquery.d.ts":{"commit":"09e37435ffb2c56a6f908081194a74756f24f99d"},"rivets/rivets.d.ts":{"commit":"cc25c17418e5b7937135c00bb959af38b494dd02"},"moment/moment.d.ts":{"commit":"b3aeee64552e324581fdbe0926f4a96e981e451b"},"moment/moment-node.d.ts":{"commit":"b3aeee64552e324581fdbe0926f4a96e981e451b"},"jqueryui/jqueryui.d.ts":{"commit":"76ed26e95e91f1c91f2d11819c44b55b617e859a"},"lodash/lodash.d.ts":{"commit":"af76bf46025371c760d8fe8c03cf874428da6124"},"mocha/mocha.d.ts":{"commit":"af76bf46025371c760d8fe8c03cf874428da6124"},"chai/chai.d.ts":{"commit":"af76bf46025371c760d8fe8c03cf874428da6124"},"jquery.transit/jquery.transit.d.ts":{"commit":"09e37435ffb2c56a6f908081194a74756f24f99d"},"es6-promise/es6-promise.d.ts":{"commit":"68548c2daab053869f323d475419c693478bbb73"},"localForage/localForage.d.ts":{"commit":"68548c2daab053869f323d475419c693478bbb73"}}}

[ERR!] .tsdrc could not be retrieved

[ERR!] Please include the following file with any support request:
    /Users/laszlo.gyulai/repos/workspaces-webapp/tsd-debug.log

fileIO.js:30:21 ํŒŒ์ผ์˜ text ๋ณ€์ˆ˜๋ฅผ console.log()ํ•˜๋ ค๊ณ  ํ•˜๋ฉด ๋‹ค์Œ๊ณผ ๊ฐ™์€ ์ž˜๋ชป๋œ JSON์ด ํ‘œ์‹œ๋ฉ๋‹ˆ๋‹ค.

{
  "_args": [
    [
      "tsd",
      ""
    ]
  ],
  "_from": "tsd@*",
  "_id": "[email protected]",
  "_inCache": true,
  "_installable": true,
  "_location": "/tsd",
  "_nodeVersion": "0.12.7",
  "_npmUser": {
    "email": "[email protected]",
    "name": "diullei"
  },
  "_npmVersion": "2.11.3",
  "_phantomChildren": {},
  "_requested": {
    "name": "tsd",
    "raw": "tsd",
    "rawSpec": "",
    "scope": null,
    "spec": "*",
    "type": "range"
  },
  "_requiredBy": [
    "#USER"
  ],
  "_resolved": "https://registry.npmjs.org/tsd/-/tsd-0.6.5.tgz",
  "_shasum": "34a0b64c1db6a70b3860fe4f5571d9d1357421ad",
  "_shrinkwrap": null,
  "_spec": "tsd",
  "_where": "",
  "author": {
    "name": "Bart van der Schoor",
    "url": "https://github.com/Bartvds"
  },
  "bin": {
    "tsd": "./build/cli.js"
  },
  "bugs": {
    "url": "https://github.com/DefinitelyTyped/tsd/issues"
  },
  "contributors": [
    {
      "name": "Diullei Gomes",
      "url": "https://github.com/Diullei"
    }
  ],
  "dependencies": {
    "assertion-error": "1.0.0",
    "bl": "^0.9.3",
    "bluebird": "~1.2.4",
    "chalk": "^1.0.0",
    "colors": "^1.1.0",
    "deep-freeze": "0.0.1",
    "definition-header": "~0.1.0",
    "detect-indent": "^0.2.0",
    "diff": "^1.4.0",
    "event-stream": "~3.1.5",
    "exit": "~0.1.2",
    "glob": "^4.0.6",
    "joi": "^4.7.0",
    "joi-assert": "0.0.3",
    "jsesc": "^0.5.0",
    "json-pointer": "^0.2.2",
    "lazy.js": "~0.3.2",
    "lru-cache": "~2.5.0",
    "minimatch": "^1.0.0",
    "minimist": "^1.1.0",
    "ministyle": "~0.1.3",
    "minitable": "0.0.4",
    "miniwrite": "~0.1.3",
    "mkdirp": "~0.5.0",
    "open": "~0.0.5",
    "request": "^2.45.0",
    "rimraf": "~2.2.8",
    "semver": "^4.3.1",
    "type-detect": "~0.1.2",
    "universal-analytics": "~0.3.4",
    "update-notifier": "^0.2.2",
    "uri-templates": "~0.1.5",
    "uuid": "^2.0.1",
    "verror": "~1.4.0"
  },
  "description": "TypeScript Definition manager for DefinitelyTyped",
  "devDependencies": {
    "chai": "~1.9.1",
    "chai-as-promised": "~4.1.1",
    "chai-fs": "^0.1.0",
    "chai-fuzzy": "~1.4.0",
    "chai-shallow-deep-equal": "0.0.3",
    "dir-compare": "^0.0.2",
    "grunt": "~0.4.4",
    "grunt-contrib-clean": "^0.6.0",
    "grunt-contrib-connect": "~0.8.0",
    "grunt-contrib-copy": "^0.6.0",
    "grunt-contrib-jshint": "^0.10.0",
    "grunt-mocha-test": "^0.12.1",
    "grunt-regex-replace": "~0.2.5",
    "grunt-shell": "^1.1.1",
    "grunt-todos": "~0.3.0",
    "grunt-ts": "4.1.0",
    "grunt-ts-clean": "~0.2.0",
    "grunt-tslint": "git+https://github.com/Bartvds/grunt-tslint.git#feature/multi",
    "grunt-tv4": "~0.4.0",
    "gruntfile-gtx": "^0.3.0",
    "jshint-path-reporter": "~0.1",
    "mocha": "^1.21.4",
    "mocha-unfunk-reporter": "^0.4.0",
    "ncp": "^1.0.1",
    "package.json-schema": "~0.2.0",
    "source-map-support": "~0.2.6",
    "time-grunt": "^1.0.0",
    "tslint-path-formatter": "~0.1.1",
    "typescript": "1.5.3"
  },
  "directories": {},
  "dist": {
    "shasum": "34a0b64c1db6a70b3860fe4f5571d9d1357421ad",
    "tarball": "http://registry.npmjs.org/tsd/-/tsd-0.6.5.tgz"
  },
  "engines": {
    "node": ">= 0.10.0"
  },
  "gitHead": "b6f7933b12a6f435deadcb042e14ab5ef8b9b638",
  "homepage": "https://github.com/DefinitelyTyped/tsd",
  "keywords": [
    "definition",
    "manager",
    "package",
    "typescript"
  ],
  "licenses": [
    {
      "type": "Apache 2.0",
      "url": "https://raw.github.com/DefinitelyTyped/tsd/master/LICENSE.txt"
    }
  ],
  "main": "./build/api.js",
  "maintainers": [
    {
      "name": "diullei",
      "email": "[email protected]"
    },
    {
      "name": "bartvds",
      "email": "[email protected]"
    },
    {
      "name": "basarat",
      "email": "[email protected]"
    },
    {
      "name": "blakeembrey",
      "email": "[email protected]"
    }
  ],
  "name": "tsd",
  "optionalDependencies": {},
  "preferGlobal": true,
  "repository": {
    "type": "git",
    "url": "git+https://github.com/DefinitelyTyped/tsd.git"
  },
  "scripts": {
    "prepublish": "grunt pre_publish",
    "test": "grunt test"
  },
  "version": "0.6.5"
}

{
    "proxy" : null,
    "token" : null,
    "git": {
        "raw": {
            "concurrent": 10,
            "allowClean": true,
            "splitDirLevel": 1,
            "splitDirChunk": 2,
            "cacheCleanInterval": {
                "days": 1
            },
            "localMaxAge": {
                "days": 7
            },
            "httpInterval": {
                "days": 1
            },
            "httpIntervalRef": {
                "minutes": 1
            },
            "jobTimeout": {
                "seconds": 5
            }
        },
        "api": {
            "concurrent": 5,
            "allowClean": true,
            "splitDirLevel": 1,
            "splitDirChunk": 2,
            "cacheCleanInterval": {
                "days": 1
            },
            "localMaxAge": {
                "days": 7
            },
            "httpInterval": {
                "minutes": 5
            },
            "jobTimeout": {
                "seconds": 5
            }
        }
    },
    "tracker": {
        "enabled": true,
        "accountID" : "UA-47495295-1"
    },
    "update-notifier": {
        "enabled": true,
        "registryUrl": "http://registry.npmjs.org/%s",
        "updateCheckTimeout": {
            "seconds": 10
        },
        "updateCheckInterval": {
            "days": 7
        }
    }
}

{
    token: "9f3eaadb6ecaef344b358aa4e14315ce82ac9540"
}

๊ฐ€์žฅ ์œ ์šฉํ•œ ๋Œ“๊ธ€

๋น„์Šทํ•œ ๋ฌธ์ œ๊ฐ€์žˆ์—ˆ์Šต๋‹ˆ๋‹ค. ์ธ์ฝ”๋”ฉ์„ BOM ์—†์ด UTF-8๋กœ ์„ค์ •ํ•ด์•ผ ํ–ˆ์Šต๋‹ˆ๋‹ค(๋ฉ”๋ชจ์žฅ++ ์‚ฌ์šฉ). ๋ฌธ์ œ๊ฐ€ ํ•ด๊ฒฐ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

๋ชจ๋“  9 ๋Œ“๊ธ€

tsd ์ž์ฒด์ ์œผ๋กœ ์‹คํ–‰ํ•ด๋„ ๋™์ผํ•œ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค. - ๋œป๋ฐ–์˜ ํ† ํฐ t

TSD๊ฐ€ settings.json ํŒŒ์ผ์„ ์ฝ์œผ๋ ค๊ณ  ํ•ฉ๋‹ˆ๋‹ค. ์ด ํŒŒ์ผ์„ ์ €์—๊ฒŒ ๋ณด๋‚ด์ฃผ์‹œ๊ฒ ์Šต๋‹ˆ๊นŒ?

/Users/laszlo.gyulai/npm-global/lib/node_modules/tsd/conf/settings.json

@Diullei , ์—ฌ๊ธฐ settings.json์ด ์žˆ์Šต๋‹ˆ๋‹ค. ๋ด์ฃผ์…”์„œ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค.

{
    "proxy" : null,
    "token" : null,
    "git": {
        "raw": {
            "concurrent": 10,
            "allowClean": true,
            "splitDirLevel": 1,
            "splitDirChunk": 2,
            "cacheCleanInterval": {
                "days": 1
            },
            "localMaxAge": {
                "days": 7
            },
            "httpInterval": {
                "days": 1
            },
            "httpIntervalRef": {
                "minutes": 1
            },
            "jobTimeout": {
                "seconds": 5
            }
        },
        "api": {
            "concurrent": 5,
            "allowClean": true,
            "splitDirLevel": 1,
            "splitDirChunk": 2,
            "cacheCleanInterval": {
                "days": 1
            },
            "localMaxAge": {
                "days": 7
            },
            "httpInterval": {
                "minutes": 5
            },
            "jobTimeout": {
                "seconds": 5
            }
        }
    },
    "tracker": {
        "enabled": true,
        "accountID" : "UA-47495295-1"
    },
    "update-notifier": {
        "enabled": true,
        "registryUrl": "http://registry.npmjs.org/%s",
        "updateCheckTimeout": {
            "seconds": 10
        },
        "updateCheckInterval": {
            "days": 7
        }
    }
}

์•Œ๊ฒ ์Šต๋‹ˆ๋‹ค. ์ด ํŒŒ์ผ์„ ์—ฌ๊ธฐ์— ์ฒจ๋ถ€ํ•˜๊ฑฐ๋‚˜ ์ด๋ฉ”์ผ([email protected])๋กœ ๋ณด๋‚ด์ฃผ์‹œ๊ฒ ์Šต๋‹ˆ๊นŒ? ํŒŒ์ผ ์ธ์ฝ”๋”ฉ์— ๋ฌธ์ œ๊ฐ€ ์žˆ์„ ์ˆ˜ ์žˆ๋‹ค๊ณ  ์ƒ๊ฐํ•ฉ๋‹ˆ๋‹ค. ์›๋ณธ ํŒŒ์ผ์ด ์žˆ์œผ๋ฉด ๋‚ด ํ™˜๊ฒฝ์—์„œ ํ…Œ์ŠคํŠธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๋น„์Šทํ•œ ๋ฌธ์ œ๊ฐ€์žˆ์—ˆ์Šต๋‹ˆ๋‹ค. ์ธ์ฝ”๋”ฉ์„ BOM ์—†์ด UTF-8๋กœ ์„ค์ •ํ•ด์•ผ ํ–ˆ์Šต๋‹ˆ๋‹ค(๋ฉ”๋ชจ์žฅ++ ์‚ฌ์šฉ). ๋ฌธ์ œ๊ฐ€ ํ•ด๊ฒฐ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

๊ฐ™์€ ๋ฌธ์ œ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. ์ธ์ฝ”๋”ฉ์„ ์–ด๋””์—์„œ ์ •์˜ํ•ด์•ผ ํ• ์ง€ ์ž˜ ๋ชจ๋ฅด๊ฒ ์Šต๋‹ˆ๊นŒ?

@vijay-karajgikar ๋ฉ”๋ชจ์žฅ++ -> ์ธ์ฝ”๋”ฉ ๋ฉ”๋‰ด.

๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค. ๋จธ๋ฆฌ๋ฅผ ๊ธ์ ์˜€์Šต๋‹ˆ๋‹ค.

VisualStudio: ํŒŒ์ผ -> ๊ณ ๊ธ‰ ์ €์žฅ ์˜ต์…˜ -> ์œ ๋‹ˆ์ฝ”๋“œ(์„œ๋ช… ์—†๋Š” UTF-8) - ์ฝ”๋“œ ํŽ˜์ด์ง€ 65001

์ด๊ฒƒ์€ ๋” ์ด์ƒ ๋ฌธ์ œ๊ฐ€ ์•„๋‹™๋‹ˆ๋‹ค. ํ์‡„.

์ด ํŽ˜์ด์ง€๊ฐ€ ๋„์›€์ด ๋˜์—ˆ๋‚˜์š”?
0 / 5 - 0 ๋“ฑ๊ธ‰

๊ด€๋ จ ๋ฌธ์ œ

L6Echo picture L6Echo  ยท  7์ฝ”๋ฉ˜ํŠธ

Diullei picture Diullei  ยท  70์ฝ”๋ฉ˜ํŠธ

blakeembrey picture blakeembrey  ยท  15์ฝ”๋ฉ˜ํŠธ

MaartenUreel picture MaartenUreel  ยท  3์ฝ”๋ฉ˜ํŠธ

KrishnaPG picture KrishnaPG  ยท  3์ฝ”๋ฉ˜ํŠธ