17

用过的:

typings install jquery --global

typings ERR! message Unable to find "jquery" ("npm") in the registry. Did you want to try searching another source? Also, if you want contribute these typings, please help us: https://github.com/typings/registry
typings ERR! caused by https://api.typings.org/entries/npm/jquery/versions/latest responded with 404, expected it to equal 200

任何人都可以帮助我。

4

2 回答 2

31

尝试:

typings install dt~jquery --global --save

编辑:

来自https://github.com/typings/typings#updating-from-0x-to-10

如果你想从 DefinitiveTyped 安装,请明确(使用 dt~ --global)。例如:typings install dt~angular-component-router --global --save

(另见下面 Fidan Hakaj 的评论)

于 2016-05-26T15:51:41.173 回答
8

如果您将 typescript2.0 与命令一起使用:

npm install -g typescript@2.0

您可以使用以下命令安装 jquery:

npm install --save @types/jquery

于 2016-10-11T18:32:33.740 回答