简体   繁体   English

键入环境安装无法正常工作

[英]Typings ambient install not working

I am trying to install some ambient typings, but it is no longer working on my machine. 我正在尝试安装一些环境类型,但它不再在我的机器上工作。 I recently upgraded node so not sure if this caused it. 我最近升级了节点,所以不确定是否会导致它。 It seems to not be looking in the dt location anymore. 它似乎不再是在dt位置。

This is the error I get: 这是我得到的错误:

~/w/r/c/src (master ⚡☡) typings search moment-timezone
Viewing 1 of 1

NAME            SOURCE HOMEPAGE                      DESCRIPTION VERSIONS UPDATED
moment-timezone dt     http://momentjs.com/timezone/             1        2016-03-29T22:03:48.000Z

~/w/r/c/src (master ⚡☡) typings i moment-timezone --ambient
typings ERR! message Unable to find "moment-timezone" ("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/moment-timezone/versions/latest responded with 404, expected it to equal 200

typings ERR! cwd /Users/pete/work/ruuby/calendar-sync/src
typings ERR! system Darwin 15.3.0
typings ERR! command "/usr/local/Cellar/node/6.1.0/bin/node" "/usr/local/bin/typings" "i" "moment-timezone" "--ambient"
typings ERR! node -v v6.1.0
typings ERR! typings -v 1.0.3

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

The answer is here: https://github.com/typings/typings/releases/tag/v1.0.0 答案在这里: https//github.com/typings/typings/releases/tag/v1.0.0

TLDR: --ambient has changed to --global TLDR: - --ambient已更改为--global

UPDATE From comment below 更新来自以下评论

You need to specify the repository too eg: 您还需要指定存储库,例如:

typings install dt~moment-timezone --global

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM