[英]Meteor install with npm install -g meteor fail with 403 error
按照官方网站https://www.meteor.com/developers/install上的说明,使用命令“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 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
不幸的是,遇到了同样的错误。 也尝试使用管理员权限安装它,但失败了。
我用来在 Windows 上安装它的另一种方法是使用 Chocolatey。
步骤如下
a) 以管理员身份打开 PowerShell
b) 运行Get-ExecutionPolicy
。 如果返回受限,则执行以下 - Set-ExecutionPolicy AllSigned
或Set-ExecutionPolicy Bypass -Scope Process
c) 运行此命令Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
d) 安装完成后。 写choco
来检查它是否真的安装了。
e) 执行以下命令choco install meteor
Chocolatey 安装的源代码可以在这里找到。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.