在公司代理后面安装打字包
Install Typing packages behind corporate proxy
我收到以下错误消息。我搜索了自签名证书问题,得到了 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>
试试“--proxy”选项。
例如
C:\..\src\UI.Spa>typings --proxy "http://xxx.xx.xx.xx:8080/" install dt~angular --global --save
我的 .typingsrc
文件位于项目根级别(typings.json 所在的位置)。
它仅包含:
proxy="http://xxx.xxx.xxx:80"
rejectUnauthorized=false
如果您在一家公司工作,blocks/restricts 命令(例如 npm install),您需要设置一个允许您绕过它的代理。我假设如果你已经走到这一步,你已经做到了。请务必记住您使用的代理,以便在下一步中将其添加到 .typingsrc 文件中。
只需在项目的根目录中创建一个 .typingsrc 文件并粘贴以下内容:
proxy="http://xxx.xxx.xxx:8080"(这是你粘贴你使用的代理的地方)
rejectUnauthorized=false
完成此操作后,您应该能够运行您的全局键入命令而不会出现错误。
我收到以下错误消息。我搜索了自签名证书问题,得到了 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>
试试“--proxy”选项。
例如
C:\..\src\UI.Spa>typings --proxy "http://xxx.xx.xx.xx:8080/" install dt~angular --global --save
我的 .typingsrc
文件位于项目根级别(typings.json 所在的位置)。
它仅包含:
proxy="http://xxx.xxx.xxx:80"
rejectUnauthorized=false
如果您在一家公司工作,blocks/restricts 命令(例如 npm install),您需要设置一个允许您绕过它的代理。我假设如果你已经走到这一步,你已经做到了。请务必记住您使用的代理,以便在下一步中将其添加到 .typingsrc 文件中。
只需在项目的根目录中创建一个 .typingsrc 文件并粘贴以下内容:
proxy="http://xxx.xxx.xxx:8080"(这是你粘贴你使用的代理的地方) rejectUnauthorized=false
完成此操作后,您应该能够运行您的全局键入命令而不会出现错误。