Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No error output with ClientsModule.registerAsync when bufferLogs enabled #8275

Closed
7 tasks done
notmedia opened this issue Oct 9, 2021 · 4 comments
Closed
7 tasks done
Labels
needs triage This issue has not been looked into

Comments

@notmedia
Copy link

notmedia commented Oct 9, 2021

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

main.ts

  const app = await NestFactory.create(AppModule, {
    bufferLogs: true,
  });

module.ts

    ClientsModule.registerAsync([
      {
        name: 'TEST',
        inject: [ConfigService],
        useFactory: (config: ConfigService<Config>): ClientProvider => {
          return {
            transport: Transport.GRPC,
            options: {
              package: 'test',
              protoPath: join(__dirname, 'test.proto'),
            },
          };
        },
      },
    ]),

For example, don't install required @grpc/proto-loader. Btw the problem in async dynamic modules error handlers.

If you run this app, there is no output.

Expected behavior

Output exists

Package

  • @nestjs/common
  • @nestjs/core
  • @nestjs/microservices

NestJS version

8

Node.js version

16

In which operating systems have you tested?

  • macOS
  • Windows
  • Linux
@notmedia notmedia added the needs triage This issue has not been looked into label Oct 9, 2021
@jmcdo29
Copy link
Member

jmcdo29 commented Oct 9, 2021

Please provide a minimum reproduction repository. This will help us in reproducing the error and testing out solutions

@notmedia
Copy link
Author

notmedia commented Oct 9, 2021

Sorry, I don't have enough time for creating a repo. I have already reported another bug for this project with repo and PR.. waiting since February. If you want, you can close this issue. I just report it for history.

@jmcdo29
Copy link
Member

jmcdo29 commented Oct 9, 2021

I was able to find where the flush() call needs to be made. I'll have a PR up for it here soon. As for the PR in nestjs/graphql, I'm not aware enough of the context around it at the moment, but I'll try to take a look soon / get Kamil's attention back on it

@jmcdo29
Copy link
Member

jmcdo29 commented Oct 10, 2021

Closing this so we can track the progress on #8278

@jmcdo29 jmcdo29 closed this as completed Oct 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage This issue has not been looked into
Projects
None yet
Development

No branches or pull requests

2 participants