TypeScript Definition manager error on query

By : Blackus
Source: Stackoverflow.com

Following the Angular 2 5 minutes quickstart, I wanted to install Angular 2 definitions (for TypeScript compiler and my IDE) provided by DefinitelyTyped using their package manager, tsd.

So I typed this command on a terminal

tsd query angular2 --action install

And all I got is the following error

>> tsd 0.5.7
    throw new TypeError('Request path contains unescaped characters.');
TypeError: Request path contains unescaped characters.
    at new ClientRequest (_http_client.js:73:11)
    at TunnelingAgent.exports.request (http.js:49:10)
    at TunnelingAgent.createSocket (/usr/local/lib/node_modules/tsd/node_modules/request/node_modules/tunnel-agent/index.js:117:25)
    at TunnelingAgent.createSecureSocket [as createSocket] (/usr/local/lib/node_modules/tsd/node_modules/request/node_modules/tunnel-agent/index.js:184:41)
    at TunnelingAgent.addRequest (/usr/local/lib/node_modules/tsd/node_modules/request/node_modules/tunnel-agent/index.js:80:8)
    at new ClientRequest (_http_client.js:154:16)
    at Object.exports.request (http.js:49:10)
    at Object.exports.request (https.js:136:15)
    at Request.start (/usr/local/lib/node_modules/tsd/node_modules/request/request.js:582:30)
    at Request.end (/usr/local/lib/node_modules/tsd/node_modules/request/request.js:1226:28)

After some search, I check my settings (npm, tsd and git) for proxy, which is well set so it is not that. I'm using tsd version 0.5.7.

Have you got any idea on how to fix this ?

Edit 05/18:

A simple query like tsd query angular2 returns me the same error, and tsd install angular2 is not a valid command, calling it returns me result of tsd --help telling me that I must run tsd query [pkgname] --action insall to install a package.

Edit upgrading to 0.6.0:

After upgrading to version 0.6.0 that had just been released, no problem anymore.

Both tsd install [pkg] and tsd query [pkg] --action install work like a charm.

By : Blackus


I've been using tsd for a few months now and have not used --action install off of a query result

I have been using version: tsd 0.6.0-beta.5 to handle my querying and installations via:

To search for a definition I use: tsd query [pkg name]

To install a definition I use: tsd install [pkg name]

I use tsd install angular2 --save to setup my angular2 project in conjunction with tsd init which creates a tsd.json to track all of my definition dependencies and keep the typings files out of version control

By : Brocco

This video can help you solving your question :)
By: admin