loopbackio / loopbackio/loopback-next

enter `lb4 example express-composition` in loopback4 CLI,and return FetchError,reason:connect ECONNREFUSED

オープン
#8,824 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

bug
主要言語
TypeScript
スター
5.1k
フォーク
1.1k
平均マージ
2日 21時間
マージ済み PR(30日)
27

説明

Describe the bug

I want to practice creating an express application with loopback REST API,and I just follow tutorial,the link of the document for tutorial is https://loopback.io/doc/en/lb4/express-with-lb4-rest-tutorial.html

Problem Desciption

In loopback CLI,I just enter the shell script lb4 example express-composition

Expecte

it can automatically download the filefolder of express-composition

Actual
FetchError: request to https://registry.npmjs.org/@loopback%2fexample-express-composition failed, reason: connect ECONNREFUSED 127.0.0.1:443
    at ClientRequest.<anonymous> (C:\Users\Barnette\AppData\Roaming\npm\node_modules\@loopback\cli\node_modules\minipass-fetch\lib\index.js:130:14)
    at ClientRequest.emit (node:events:526:28)
    at TLSSocket.socketErrorListener (node:_http_client:442:9)
    at TLSSocket.emit (node:events:538:35)
    at emitErrorNT (node:internal/streams/destroy:157:8)
    at emitErrorCloseNT (node:internal/streams/destroy:122:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  code: 'ECONNREFUSED',
  errno: 'ECONNREFUSED',
  syscall: 'connect',
  address: '127.0.0.1',
  port: 443,
  type: 'system'
}
something I did try to solve the problem

I set the npm config,just like follows:

npm config set http-proxy http://127.0.0.1:443 
npm config set https-proxy http://127.0.0.1:443
npm config set proxy http://127.0.0.1:443  
npm config set registry https://registry.npm.taobao.org
Result of trying

the same as the above ,just return connect ECONNREFUSED

what should I do so solve the problem?

Logs
FetchError: request to https://registry.npmjs.org/@loopback%2fexample-express-composition failed, reason: connect ECONNREFUSED 127.0.0.1:443
    at ClientRequest.<anonymous> (C:\Users\Barnette\AppData\Roaming\npm\node_modules\@loopback\cli\node_modules\minipass-fetch\lib\index.js:130:14)
    at ClientRequest.emit (node:events:526:28)
    at TLSSocket.socketErrorListener (node:_http_client:442:9)
    at TLSSocket.emit (node:events:538:35)
    at emitErrorNT (node:internal/streams/destroy:157:8)
    at emitErrorCloseNT (node:internal/streams/destroy:122:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  code: 'ECONNREFUSED',
  errno: 'ECONNREFUSED',
  syscall: 'connect',
  address: '127.0.0.1',
  port: 443,
  type: 'system'
}
Additional information

the result of reproduce the error in the codebox

No change to package.json was detected. No package manager install will be executed.
npm WARN config cache-min This option has been deprecated in favor of `--prefer-offline`.
npm ERR! code ETARGET
npm ERR! notarget No matching version found for eslint-plugin-eslint-plugin@^4.4.1.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/sandbox/.npm/_logs/2022-08-15T08_24_48_142Z-debug-0.log

The example was cloned to loopback4-example-express-composition.
Reproduction

https://codesandbox.io/s/currying-grass-r4ekfr

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、リンクされた CodeSandbox を使って lb4 example express-composition を再現し、報告された npm registry、proxy、ECONNREFUSED の出力を比較します。例のダウンロードを処理する LoopBack CLI entry point を確認し、失敗の原因が CLI なのかローカルの npm 設定なのかを検証します。原因と再現可能な解決策が文書化されるか、回帰テストでカバーされれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
node.js, typescript
領域
cli
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。