安装angular-route.d.ts时出现问题

时间:2016-09-01 05:44:07

标签: angularjs typescript angular-routing typescript-typings

我正在使用命令typings install angular-route --save -global 要安装angular-route。但它显示了这个错误。帮我解决这个错误。

typings ERR! message Unable to find "angular-route" ("npm") in the registry.
typings ERR! message However, we found "angular-route" for 1 other source: "dt"
typings ERR! message You can install these using the "source" option.
typings ERR! message We could use your help adding these typings to the registry: https://github.com/typings/registry
typings ERR! caused by https://api.typings.org/entries/npm/angular-route/versions/latest responded with 404, expected it to equal 200

typings ERR! cwd /Users/sun/enclarity-ui
typings ERR! system Darwin 13.3.0
typings ERR! command "node" "/Users/sun/.nvm/versions/node/v0.12.15/bin/typings" "install" "angular-route" "--save" "-global"
typings ERR! node -v v0.12.15
typings ERR! typings -v 1.3.2

typings ERR! If you need help, you may report this error at:
typings ERR!   <https://github.com/typings/typings/issues>

这是我搜索时得到的

typings search  angular-route
Viewing 2 of 2

NAME                           SOURCE HOMEPAGE             DESCRIPTION VERSIONS UPDATED                 
angular-route                  dt     http://angularjs.org             1        2016-03-17T12:06:54.000Z
angularjs/legacy/angular-route dt     http://angularjs.org             1        2016-03-17T12:06:54.000Z

编辑:我使用的是角色1.5

1 个答案:

答案 0 :(得分:1)

使用typings install dt~angular-route --save --global

注意 dt~ (输入源为DefinitelyTyped)和 - 全球

更多信息here