pingCheck throws `TypeError: (0 , rxjs_1.lastValueFrom) is not a function` resulting in incorrect error detection
See original GitHub issueIs there an existing issue for this?
- I have searched the existing issues
Current behavior
When using pingCheck from HttpHealthIndicator
Minimum reproduction code
this.http.pingCheck('google', 'https://google.com')
Steps to reproduce
Create a project with this pingCheck
and add a console.log(err);
in the pingCheck
function. Otherwise the error will not be shown and is therefore invisible!
It might be interesting that we use rxjs@7.4.0
in package.json
🤔 I’m not sure if this affects this in any way.
Expected behavior
It should handle errors like responseCheck
Package version
8.0.1
NestJS version
8.2.3
Node.js version
16.13.0
In which operating systems have you tested?
- macOS
- Windows
- Linux
Other
When adding console.log(err);
in <projectPath>/node_modules/@nestjs/terminus/dist/health-indicator/http/http.health.js
Line 120 (between catch (err) {
and this.generateHttpError(key, err);
) you can see:
TypeError: (0 , rxjs_1.lastValueFrom) is not a function
at HttpHealthIndicator.<anonymous> (<projectPath>/node_modules/@nestjs/terminus/dist/health-indicator/http/http.health.js:116:48)
at Generator.next (<anonymous>)
at <projectPath>/node_modules/@nestjs/terminus/dist/health-indicator/http/http.health.js:17:71
at new Promise (<anonymous>)
at __awaiter (<projectPath>/node_modules/@nestjs/terminus/dist/health-indicator/http/http.health.js:13:12)
at HttpHealthIndicator.pingCheck (<projectPath>/node_modules/@nestjs/terminus/dist/health-indicator/http/http.health.js:108:16)
at health.check.dns.responseCheck.status.status (<projectPath>/src/endpoints/health/health.controller.ts:19:28)
at HealthCheckExecutor.<anonymous> (<projectPath>/node_modules/@nestjs/terminus/dist/health-check/health-check-executor.service.js:66:42)
at Generator.next (<anonymous>)
at <projectPath>/node_modules/@nestjs/terminus/dist/health-check/health-check-executor.service.js:14:71
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
TypeError: rxjs_1.lastValueFrom is not a function
lastValueFrom is not a function with but no error when I exclude TypeOrmModule.forRoot({}) . What could be the reason for the error ?...
Read more >rxjs_1. lastValueFrom is not a function · Issue #7468
Bug Report Current behavior I have installed fresh copy of nestjs trying to connect to mysql db this is imports array in app.module.ts ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@Shinigami92, yes, surely it can be useful in the future if other people experience this problem. If you want you can close this issue., unfortunately I do not have the permissions to close this problem. Maybe I will have them in the future who knows.
However if you have any difficulties or doubts in the future remember that you can always use the Discord support channel. 😉👍
If I remember correctly, yes I tried that and also completely clean node_modules and everything Our team decided (sadly) that we don’t need the health module anyways, so I removed it completely 🤷 So I don’t have a reprogression anymore 😕
You can close the issue if you want to, but see it as a notification if it come up again from other users