【问题标题】:Meteor install with npm install -g meteor fail with 403 error使用 npm install -g meteor 安装失败并出现 403 错误
【发布时间】:2021-07-13 13:21:59
【问题描述】:

按照官方网站https://www.meteor.com/developers/install 上的说明使用命令“npm install -g 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

【问题讨论】:

    标签: javascript node.js npm meteor meteor-blaze


    【解决方案1】:

    不幸的是,遇到了同样的错误。也尝试使用管理员权限安装它,但失败了。

    我用来在 Windows 上安装它的另一种方法是使用 Chocolatey。

    步骤如下

    a) 以管理员身份打开 PowerShell

    b) 运行Get-ExecutionPolicy。如果返回受限,请执行以下命令 - Set-ExecutionPolicy AllSignedSet-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'))

    d) 安装完成后。写choco检查是否真的安装了。

    e) 执行以下命令choco install meteor

    Chocolatey 安装的源代码可以在 here 找到。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-06-19
      • 2016-11-08
      • 2021-12-16
      • 1970-01-01
      • 1970-01-01
      • 2016-06-12
      • 1970-01-01
      • 2019-03-29
      相关资源
      最近更新 更多