CuriousMind CuriousMind - 1 year ago 109
Node.js Question

Typings install not working for already configured typescript definitions

I have typings.json file with declarations to include some of the typescript definitions required for my project. Check reference below

...
"ambientDependencies": {
"bluebird": "registry:dt/bluebird#2.0.0+20160319051630",
"express": "registry:dt/express#4.0.0+20160317120654",
"express-serve-static-core": "registry:dt/express-serve-static-core#0.0.0+20160322035842",
...


But when I try to execute
typings install
command nothing gets installed and typescript issues following statement

--- (No dependencies)


Unlike
npm install
which installs packages from
package.json
, the typings command is not working as expected. Am I having a wrong assumption? Till now I have avoided check-in of the typescript definitions (stored inside
typings
folder) in version control (like
node_modules
). Is it necessary to check-in this files?

UPDATE
It was my mistake, I update the
typings
command line utility to version
1.0.5
. I checked the https://github.com/typings/typings and realized that I need to change the typings.json to work with new major version. changed the
typings.json
as per the instructions given on the site and it is working now.

Answer

You've added the definitions using 0.x version of typings.
--ambient command is deprecated. Use --global instead.
In order to fix existing typings.json file you can rename "ambientDependencies" to "globalDependencies"