Javascript Meteor安装与npm安装-g Meteor失败与403错误
按照官方网站上的指示,使用命令“npm install-g meteor”安装meteor会出现以下错误Javascript Meteor安装与npm安装-g Meteor失败与403错误,javascript,node.js,npm,meteor,meteor-blaze,Javascript,Node.js,Npm,Meteor,Meteor Blaze,按照官方网站上的指示,使用命令“npm install-g meteor”安装meteor会出现以下错误 os win 10 pro node -v v14.15.1 npm -v 6.14.8 它给出了以下错误: Downloading |░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░| 0%events.js:292 throw er; // Unhandled 'error' event ^ Error: Response
os
win 10 pro
node -v
v14.15.1
npm -v
6.14.8
它给出了以下错误:
Downloading |░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░| 0%events.js:292
throw er; // Unhandled 'error' event
^
Error: Response status was 403
at ClientRequest.<anonymous> (C:\Users\Jefferson\AppData\Roaming\npm\node_modules\meteor\node_modules\node-downloader-helper\dist\index.js:1:7153)
at Object.onceWrapper (events.js:422:26)
at ClientRequest.emit (events.js:315:20)
at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:641:27)
at HTTPParser.parserOnHeadersComplete (_http_common.js:126:17)
at TLSSocket.socketOnData (_http_client.js:509:22)
at TLSSocket.emit (events.js:315:20)
at addChunk (_stream_readable.js:309:12)
at readableAddChunk (_stream_readable.js:284:9)
at TLSSocket.Readable.push (_stream_readable.js:223:10)
Emitted 'error' event on b instance at:
at ClientRequest.<anonymous> (C:\Users\Jefferson\AppData\Roaming\npm\node_modules\meteor\node_modules\node-downloader-helper\dist\index.js:1:7284)
at Object.onceWrapper (events.js:422:26)
[... lines matching original stack trace ...]
at TLSSocket.Readable.push (_stream_readable.js:223:10) {
status: 403,
body: ''
}
+ meteor@2.2.0
added 46 packages from 25 contributors in 16.461s
下载|░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░| 0%事件。js:292
投掷者;//未处理的“错误”事件
^
错误:响应状态为403
在ClientRequest。(C:\Users\Jefferson\AppData\Roaming\npm\node\u modules\meteor\node\u modules\node downloader helper\dist\index.js:1:7153)
在Object.onceWrapper(events.js:422:26)
在ClientRequest.emit(events.js:315:20)
在HTTPParser.parserOnIncomingClient[作为onIncoming](_http_client.js:641:27)
在HTTPParser.parserOnHeadersComplete(_http_common.js:126:17)
在TLSSocket.socketOnData(_http_client.js:509:22)
在TLSSocket.emit(events.js:315:20)
在addChunk(_stream_readable.js:309:12)
在readableAddChunk(_stream_readable.js:284:9)
在TLSSocket.Readable.push(_stream_Readable.js:223:10)
在以下位置的b实例上发出了“错误”事件:
在ClientRequest。(C:\Users\Jefferson\AppData\Roaming\npm\node\u modules\meteor\node\u modules\node downloader helper\dist\index.js:1:7284)
在Object.onceWrapper(events.js:422:26)
[…与原始堆栈跟踪匹配的行…]
在TLSSocket.Readable.push(_stream_Readable.js:223:10){
现状:403,
正文:“”
}
+ meteor@2.2.0
在16.461s中添加了来自25个参与者的46个包
不幸地遇到了同样的错误。也尝试使用管理员权限安装它,但失败
我在Windows上安装它的另一种方法是使用巧克力
步骤如下
a) 以管理员身份打开PowerShell
b) 运行Get ExecutionPolicy
。如果返回受限,请执行以下-Set ExecutionPolicy AllSigned
或Set ExecutionPolicy Bypass-作用域过程
c) 运行此命令Set ExecutionPolicy Bypass-Scope Process-Force;[System.Net.ServicePointManager]::SecurityProtocol=[System.Net.ServicePointManager]::SecurityProtocol-bor 3072;iex((新对象系统.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1)
d) 一旦安装完成。写入choco
检查它是否已实际安装
e) 执行以下命令choco安装meteor
可以找到巧克力安装的来源。非常感谢您解决了这个问题