question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pingCheck throws `TypeError: (0 , rxjs_1.lastValueFrom) is not a function` resulting in incorrect error detection

See original GitHub issue

Is 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:closed
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Tony133commented, Nov 27, 2021

@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. 😉👍

0reactions
Shinigami92commented, Nov 27, 2021

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found