我试图使用npm命令安装express framework,但出现以下错误.

错误消息是

E:\myFindings\nodejs_programs\node>npm install -g express
npm http GET https://registry.npmjs.org/express
npm ERR! Error: SSL Error: CERT_UNTRUSTED
npm ERR!     at ClientRequest.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\request\main.js:409:26)
npm ERR!     at ClientRequest.g (events.js:185:14)
npm ERR!     at ClientRequest.EventEmitter.emit (events.js:88:17)
npm ERR!     at HTTPParser.parserOnIncomingClient [as onIncoming] (http.js:1445:7)
npm ERR!     at HTTPParser.parserOnHeadersComplete [as onHeadersComplete] (http.js:111:23)
npm ERR!     at CleartextStream.socketOnData [as ondata] (http.js:1356:20)
npm ERR!     at CleartextStream.CryptoStream._push (tls.js:396:27)
npm ERR!     at SecurePair.cycle (tls.js:751:20)
npm ERR!     at EncryptedStream.CryptoStream.write (tls.js:131:13)
npm ERR!     at Socket.ondata (stream.js:38:26)
npm ERR!  [Error: SSL Error: CERT_UNTRUSTED]
npm ERR! 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\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "express"
npm ERR! cwd E:\myFindings\nodejs_programs\node
npm ERR! node -v v0.8.0
npm ERR! npm -v 1.1.32
npm ERR! message SSL Error: CERT_UNTRUSTED
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     E:\myFindings\nodejs_programs\node\npm-debug.log
npm ERR! not ok code 0

帮我整理一下

推荐答案

我想我已经找到了上述错误的原因.它是为了在客户端网络中工作而提供的公司代理(虚拟专用网络).没有这种联系,我经常面临同样的问题,无论是maven build还是npm安装.

Node.js相关问答推荐

如何使用聚合管道交换键值对

Express无法发布

如何使用多个参数完成

如何在Mongoose for MongoDB中编写此查询

通过 Node js 中的 TBA 执行 netsuite REST upsert 操作出现 401 错误

我收到警告:发现函数rs-ms-v1不受支持的运行时nodejs18.x× 不受支持的运行时

TS[2339]:类型 '() => Promise<(Document & Omit) | 上不存在属性空>'

Postgressql的BIGSERIAL自增序列,即使由于唯一约束错误没有创建行,也会自动增加

在对象数组中的数组中嵌套 $lookup - Mongodb

MongoDB Aggregate - 如何使用前一阶段的值作为下一阶段的字段名称?

使用 node/express/Multer,您如何首先判断参数?

使用 Forms API 进行批量更新时生成 itemId

自定义 Docker 容器 Github 操作无法在 /github/workspace 中找到 Node 脚本

类型中缺少属性,该类型是由类实现的接口

您如何写入 aws lambda 实例的文件系统?

提供静态文件到底是什么意思?

如何brew安装特定版本的Node?

当进程被杀死时,如何优雅地关闭我的 Express 服务器?

node.js 示例

为什么 Node.js 没有原生 DOM?