DefinitelyTyped / tsd

[DEPRECATED] TypeScript Definition manager for DefinitelyTyped
Apache License 2.0
1.12k stars 135 forks source link

cannot run tsd install #291

Closed zaherz closed 7 years ago

zaherz commented 7 years ago

Hello,

I'm unable to run tsd install any --save

see below exception

Unexpected end of input [ERR!] cwd : C:\Users\zkhater\Documents\ccm_wa\check_tsd [ERR!] os : Windows_NT 10.0.10586 [ERR!] argv : "C:\Program Files\nodejs\node.exe" "C:\Users\zkhater\AppData\Roaming\npm\node_modules\tsd\build\cli.js" "install" "jquery" "--save" [ERR!] node : v4.6.0 [ERR!] tsd : 0.6.5 [ERR!] Error: Unexpected end of input [ERR!] CODE : undefined [ERR!] Unexpected end of input [ERR!] If you need help, you may report this error at: https://github.com/DefinitelyTyped/tsd/issues

[ERR!] .tsdrc could not be retrieved

[ERR!] Please include the following file with any support request: C:\Users\zkhater\Documents\ccm_wa\check_tsd\tsd-debug.log

tsd-debug.log content:

[ERR!] cwd : C:\Users\zkhater\Documents\ccm_wa\check_tsd [ERR!] os : Windows_NT 10.0.10586 [ERR!] argv : "C:\Program Files\nodejs\node.exe" "C:\Users\zkhater\AppData\Roaming\npm\node_modules\tsd\build\cli.js" "install" "jquery" "--save" [ERR!] node : v4.6.0 [ERR!] tsd : 0.6.5 [ERR!] Error: Unexpected end of input [ERR!] CODE : undefined [ERR!] Unexpected end of input [ERR!] If you need help, you may report this error at: https://github.com/DefinitelyTyped/tsd/issues

[ERR!] SyntaxError: Unexpected end of input at Object.parse (native) at C:\Users\zkhater\AppData\Roaming\npm\node_modules\tsd\build\http\HTTPCache.js:131:39 at tryCatch1 (C:\Users\zkhater\AppData\Roaming\npm\node_modules\tsd\node_modules\bluebird\js\main\util.js:63:19) at Promise$_callHandler as _callHandler at Promise$_settlePromiseFromHandler as _settlePromiseFromHandler at Promise$_settlePromiseAt as _settlePromiseAt at Promise$_settlePromises as _settlePromises at Async$_consumeFunctionBuffer as _consumeFunctionBuffer at Async$consumeFunctionBuffer (C:\Users\zkhater\AppData\Roaming\npm\node_modules\tsd\node_modules\bluebird\js\main\async.js:37:14) at nextTickCallbackWith0Args (node.js:420:9)

[ERR!] tsd.json: {"version":"v4","repo":"borisyankov/DefinitelyTyped","ref":"master","path":"typings","bundle":"typings/tsd.d.ts","installed":{}}

[ERR!] .tsdrc could not be retrieved

[ERR!] Please include the following file with any support request: C:\Users\zkhater\Documents\ccm_wa\check_tsd\tsd-debug.log

zaherz commented 7 years ago

After a deep investigation i was able to fix the issue.

I did below steps: 1- removed all the content of: %appdata%\npm 2- removed all the content of: %appdata%\npm-cache 3- removed all the content of: %appdata%\tsd-cache 4- open new console and run first npm install tsd -g 5- then run npm install typescript -g

tsd install --save ran as expected!