loopbackio / loopbackio/loopback-next
enter `lb4 example express-composition` in loopback4 CLI,and return FetchError,reason:connect ECONNREFUSED
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.1k
- Forks
- 1.1k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 27
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing lb4 example express-composition using the linked CodeSandbox and compare the reported npm registry, proxy, and ECONNREFUSED output. Review the LoopBack CLI entry point handling example downloads and verify whether the failure is caused by the CLI or the local npm configuration; done means the cause and a reproducible resolution are documented or covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100