任何关于如何在代理后面的窗口中安装grunt的建议



我正试图在公司代理后面的windows机器上安装grunt。

我已经安装了node和npm,我可以从命令行看到它们的版本。但是当我尝试按照grunt网站中的描述安装grunt时http://gruntjs.com/getting-started但我遇到了以下错误,我不知道如何解决。

这是我收到的错误消息:

npm.cmd: npm ERR! Error: CERT_UNTRUSTED
At line:1 char:4 + npm <<<< install -g grunt-cli + CategoryInfo : NotSpecified:
(npm ERR! Error: CERT_UNTRUSTED:String) [], RemoteException + FullyQualifiedErrorId: 
NativeCommandError
npm ERR! at SecurePair.<anonymous> (tls.js:1367:32), npm ERR! at SecurePair.emit (events.js:92:17), npm ERR! at SecurePair.maybeInitFinished (tls.js:979:10), npm ERR! at CleartextStream.read [as _read] (tls.js:471:13), npm ERR! at CleartextStream.Readable.read (_stream_readable.js:340:10), npm ERR! at EncryptedStream.write [as _write] (tls.js:368:25)
npm ERR! at doWrite (_stream_writable.js:225:10), npm ERR! at writeOrBuffer (_stream_writable.js:215:5), npm ERR! at EncryptedStream.Writable.write (_stream_writable.js:182:11), npm ERR! at at write (_stream_readable.js:601:24), npm ERR! If you need help, you may report this *entire* log, npm ERR! including the npm and node versions, at: npm ERR! <http://github.com/npm/npm/issues>, npm ERR! System Windows_NT 6.1.7601, npm ERR! command "C:\Program Files (x86)\nodejs\\node.exe" "C:\Program Files (x86)\nodejs\node_modules\npm\bin\npm-cli.js" "install" "-g" "grunt-cli"
npm ERR!cwd C:DevgruntTest2, npm ERR! node -v v0.10.31, npm ERR! npm -v 1.4.23

我正在使用visual studio 2013。我尝试过从命令行和PackageManager控制台直接安装,但基本上我得到了相同的错误。

如何解决这个问题有什么建议吗?

提前谢谢。

为了能够从npm安装grunt或其他任何东西,首先我需要使用以下命令:

npm配置设置严格ssl错误

我在stackoverflow和其他网站的不同地方找到了这个答案。但我用拉梅什的回答作为参考。我还包括了网络的代理地址,但直到我更改了严格的ssl配置,这才起作用。

您可以在自己的系统上运行代理(fiddler可以充当代理)

并将浏览器代理设置指向此代理。

因为fiddler是在您的凭据下启动的,所以代理身份验证不再是一个问题。

请记住在更改代理设置后重新启动程序

最新更新