loopbackio / loopbackio/loopback-next

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

Offen
#8,824 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

bug
Vorherrschende Sprache
TypeScript
Sterne
5.1k
Forks
1.1k
Ø Merge
2 T. 21 Std.
Gemergte PRs (30 T.)
27

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne damit, lb4 example express-composition mit der verlinkten CodeSandbox zu reproduzieren, und vergleiche die gemeldete Ausgabe zu npm registry, proxy und ECONNREFUSED. Überprüfe den LoopBack CLI entry point, der die Downloads von Beispielen verarbeitet, und stelle fest, ob der Fehler durch die CLI oder die lokale npm-Konfiguration verursacht wird; als erledigt gilt die Aufgabe, wenn die Ursache und eine reproduzierbare Lösung dokumentiert oder durch einen Regressionstest abgedeckt sind.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
node.js, typescript
Bereich
cli
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.