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

[Bug]: Config types issues and runtime errors #1825

Open
2 of 4 tasks
kuncevic opened this issue Jul 30, 2024 · 3 comments
Open
2 of 4 tasks

[Bug]: Config types issues and runtime errors #1825

kuncevic opened this issue Jul 30, 2024 · 3 comments

Comments

@kuncevic
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

I am trying to configure the logger according to the docs https://github.com/jmcdo29/ogma/tree/main/packages/nestjs-module.

First I've tried an async config and got into this issue

Next I've tried sync config, got a type error TS2353: Object literal may only specify known properties, and service does not exist in type OgmaModuleOptions which eventually I've surpress with #215 @ts-ignore`

However end up with runtime error sending http request or navigating to the app:

 ERROR [ExceptionsHandler] Cannot read properties of undefined (reading 'setRequestId')
[0] TypeError: Cannot read properties of undefined (reading 'setRequestId')

any thoughts?

Minimum reproduction code

https://github.com/kuncevic/nest-ogma-issue

Steps to reproduce

npm i
npm run start:dev

Expected behavior

There should not be any errors

Package(s) version

"@ogma/nestjs-module": "^5.1.4",
"@ogma/platform-express": "^5.0.1",

Node.js version

20.14

In which operating systems have you tested?

  • macOS
  • Windows
  • Linux

Other

No response

@kuncevic
Copy link
Author

Just came across this one https://discord.com/channels/520622812742811698/1058055360994353172/threads/1199324371102220338, might assume that something to do with the github docs as it seems quite different on https://ogma.jaymcdoniel.dev/en/nestjs/module/

@jmcdo29
Copy link
Owner

jmcdo29 commented Jul 30, 2024

Right, I need to update the READMEs to point to the docs website instead of duplicating the documentation

@kuncevic
Copy link
Author

Right, I need to update the READMEs to point to the docs website instead of duplicating the documentation

Yeah, I understand this is quite hard to maintain with multiple documentation sources. I can keep this issue open as a reminder for you to fix it, as it seems confusing to many people.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants