我正在尝试在我的应用程序中安装依赖项,但我收到错误消息,环境标志已贬值,终端也说将其替换为 --global 我已经完成了,但现在终端说“无法在注册表”。我点击此链接进行 e2e 测试http://latonez.github.io/2016/ionic-2-e2e-testing/ http://lathonez.github.io/2016/ionic-2-e2e-testing/
yokeshs-Mac-mini:easycloud yokesh$ sudo typings install express --save --ambient
typings ERR! deprecated The "ambient" flag is deprecated. Please use "global" instead
yokeshs-Mac-mini:easycloud yokesh$ sudo typings install --global --save angular-protractor jasmine node selenium-webdriver
typings ERR! message Unable to find "node" ("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/node/versions/latest responded with 404, expected it to equal 200
typings ERR! cwd /Users/yokesh/easycloud
typings ERR! system Darwin 15.5.0
typings ERR! command "/usr/local/bin/node" "/usr/local/bin/typings" "install" "--global" "--save" "angular-protractor" "jasmine" "node" "selenium-webdriver"
typings ERR! node -v v4.4.3
typings ERR! typings -v 1.1.0
typings ERR! If you need help, you may report this error at:
typings ERR! <https://github.com/typings/typings/issues>
yokeshs-Mac-mini:easycloud yokesh$
我只是想知道如何安装这个命令“typings install --ambient --save Angular-Protractor jasmine Node selenium-webdriver”
从 1.0 版开始,TypeScript 定义管理器进行了一些更新(see here https://github.com/typings/typings#updating-from-0x-to-10)其中包括弃用--ambient
flag.
- Usages of ambient are now global
- 这意味着在
typings.json
any ambientDependencies
应该重命名globalDependencies
和任何ambientDevDependencies
应该
重命名globalDevDependencies
.
- 这也意味着
--ambient
is now --global
参考快速入门示例 https://github.com/typings/typings#quick-start在 GitHub 页面上,您需要做的是显式引用要从中安装类型定义的注册表,以便 Typings 知道在哪里查找它。
示例(Windows CLI)
通过搜索找到该包
typings search *name*
然后在命令行中从打印的结果表中获取源码(来源专栏)
| NAME | SOURCE | HOMEPAGE | DESCRIPTION | VERSIONS | UPDATED |
|--------------------------------------------------------------
| | | | | | |
| | | | | | |
在此示例中,您要安装的每个包都会随源一起返回dt
。在我的安装命令中,我现在必须明确告诉打字来安装每个包dt
(绝对打字 https://github.com/DefinitelyTyped/DefinitelyTyped).
typings install --global --save dt~angular-protractor dt~jasmine dt~node dt~selenium-webdriver
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)