[Bug]: Config types issues and runtime errors
Is there an existing issue for this?
- [X] 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?
- [X] macOS
- [ ] Windows
- [ ] Linux
Other
No response
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/
Right, I need to update the READMEs to point to the docs website instead of duplicating the documentation
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.