typescript-typings - 在公司代理后面安装打字包

标签 typescript-typings

我收到以下错误消息。我搜索了自签名证书问题,然后找到了 this回答,但我做了这里提到的一切。我只是四处走动,仍然没有成功。

到目前为止我做了什么 :

  • 我的 %USERPROFILE% 目录中有一个 .typingsrc,其中包含以下示例
  • 我的项目根目录中有另一个 .typingsrc 文件,其中包含以下示例
  • 我已经尝试了以下示例的所有组合

  • 问题 :
  • .typingsrc 文件应该放在 Windows 7 的什么位置?
  • 在哪里可以找到有关 .typingsrc 文件属性的文档?它总是被提及,并且没有带参数的示例。
  • .typingsrc 是 JSON 文件还是其他文件?

  • 还是没有成功。

    你有解决办法吗?
    {
            "rejectUnauthoriozed":false,
            "httpProxy": "",
            "httpsProxy": "",
            "insecure":true,
            "strict-ssl":false
    }
    

    错误信息:
    C:\..\src\UI.Spa>typings install dt~angular --global --save
    typings ERR! message Unable to connect to "https://api.typings.org/entries/dt/angular/versions/latest"
    typings ERR! caused by self signed certificate in certificate chain
    
    typings ERR! cwd C:\..\src\UI.Spa
    typings ERR! system Windows_NT 6.1.7601
    typings ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\..\\AppData\\Roaming\\npm\\node_modules\\typings\\dist\\bin.js" "install" "dt~angular" "--global" "--save"
    typings ERR! node -v v5.10.1
    typings ERR! typings -v 1.1.0
    typings ERR! code EUNAVAILABLE
    
    typings ERR! If you need help, you may report this error at:
    typings ERR!   <https://github.com/typings/typings/issues>
    

    最佳答案

    我的 .typingsrc文件位于项目根级别(typings.json 所在的位置)。

    它只包含:

    proxy="http://xxx.xxx.xxx:80"
    rejectUnauthorized=false 
    

    关于typescript-typings - 在公司代理后面安装打字包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37816106/

    相关文章:

    javascript - 如何用参数和模板文字来描述函数?

    typescript :包装泛型类的函数返回类型

    javascript - typescript 命名空间引用不起作用

    typescript - dt~ react 路由器错误TS2503 : Cannot find namespace 'HistoryModule'

    javascript - 覆盖 d3 TypeScript 定义文件

    typescript - TS中的keyof数组类型很奇怪

    typescript - 无需强制转换即可将元组类型值映射到不同的元组类型值

    typescript - 根据 Typescript 中多个对象的同名属性创建对象类型?

    typescript :增量数字类型

    javascript - typescript 对象在参数中休息打字