loopbackio / loopbackio/loopback-next

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

Abierto
#8,824 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

bug
Lenguaje dominante
TypeScript
Estrellas
5.1k
Forks
1.1k
Merge medio
2 d 21 h
PR fusionados (30 d)
27

Descripción

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

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comienza reproduciendo lb4 example express-composition usando el CodeSandbox enlazado y compara la salida indicada de npm registry, proxy y ECONNREFUSED. Revisa el LoopBack CLI entry point que gestiona las descargas de ejemplos y verifica si el fallo está causado por la CLI o por la configuración local de npm; se considera terminado cuando la causa y una resolución reproducible están documentadas o cubiertas por una prueba de regresión.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
node.js, typescript
Área
cli
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.