Kunal Khanna
Kunal Khanna

Reputation: 33

tsd reinstall: The type definition `index.d.ts` does not exist. Create one and try again

I was looking into upgrading the tsd version in my node project from 0.6.5 version to the latest 0.13.1. I have a tsd.json defined which is used when I run tsd reinstall. This used to work for version 0.6.5, however, with the new 0.13.1 version, the tsd reinstall fails with the message:

"The type definition index.d.ts does not exist. Create one and try again".

We never had any index.d.ts file defined earlier when it used to work with version 0.6.5.

Can someone please help with the following:

  1. Why do we need the index.d.ts file?
  2. What should be the content of this file?

Any help is appreciated.

NOTE: I know that tsd is deprecated to use npm @types, but I am hoping to continue using tsd for now.

Upvotes: 0

Views: 1913

Answers (1)

Farhad
Farhad

Reputation: 632

For other people facing this issue you should search for @types <the_thing_you_want> and if you found the npm package you can install it as the package itself guides you

For example, if you are trying to install @types for mssql, use this

npm install --save @types/mssql

Upvotes: 1

Related Questions