1
votes

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.

1
Which version of typings? Have you recently upgraded from pre-1.0 to post-1.0? Did you add the typings via typings itself, or by editing the JSON directly?jonrsharpe
I have added the definition using typings install XXX --save --ambient command. None of the dependencies are handcoded. The typings version is 1.0.5.CuriousMind

1 Answers

2
votes

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"