[英]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.