Express节点包管理器安装错误 [英] node package manager install error with Express

查看:74
本文介绍了Express节点包管理器安装错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用节点包管理器安装Express,并收到以下错误.这是在以管理员身份运行cmd的Windows 7 x64上.有帮助吗?

I'm attempting to install express using the node package manager and am getting the below error. This is on Windows 7 x64 running cmd as administrator. Any assistance?

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\>npm install express -g
npm http GET https://registry.npmjs.org/express
npm http GET https://registry.npmjs.org/express
npm http GET https://registry.npmjs.org/express
npm ERR! Error: SELF_SIGNED_CERT_IN_CHAIN
npm ERR!     at SecurePair.<anonymous> (tls.js:1283:32)
npm ERR!     at SecurePair.EventEmitter.emit (events.js:92:17)
npm ERR!     at SecurePair.maybeInitFinished (tls.js:896:10)
npm ERR!     at CleartextStream.read [as _read] (tls.js:430:15)
npm ERR!     at CleartextStream.Readable.read (_stream_readable.js:304:10)
npm ERR!     at EncryptedStream.write [as _write] (tls.js:344:25)
npm ERR!     at doWrite (_stream_writable.js:211:10)
npm ERR!     at writeOrBuffer (_stream_writable.js:201:5)
npm ERR!     at EncryptedStream.Writable.write (_stream_writable.js:172:11)
npm ERR!     at write (_stream_readable.js:557:24)
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "express" "-g"
npm ERR! cwd C:\
npm ERR! node -v v0.10.5
npm ERR! npm -v 1.2.18
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\npm-debug.log
npm ERR! not ok code 0

我可以在Chrome中返回JSON的情况下连接到 http://registry.npmjs.org/express /p>

I can connect to http://registry.npmjs.org/express in Chrome returning JSON

推荐答案

如果连接到http s ://registry.npmjs.org/,Chrome 为您提供SSL错误,因为registry.npmjs.org正在提供自签名SSL证书. Registry.npmjs.org现在使用正确的CA签名的证书.

You'll notice if you connect to https://registry.npmjs.org/, Chrome will give you an SSL error since registry.npmjs.org is serving up a self-signed SSL certificate. registry.npmjs.org now uses a proper CA-signed certificate.

有两种可能性:

  • 您的npm配置搞砸了.删除所有与npm相关的内容,然后重新安装.
  • 如果您所在的环境具有HTTPS代理拦截,则可能会破坏npm.与您的网络管理员联系.

这篇关于Express节点包管理器安装错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆