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
Exception: winston.Logger is not a constructor #175
Comments
can you add the stack trace? |
This should be part of the winston-3 branch https://github.com/bithavoc/express-winston/tree/winston-3 @makrandgupta is on it. |
Attached is the stack trace:
|
|
After upgrading Winston to 3.0.0, and updating our code to use: How should we troubleshoot and fix this?
|
@surfaceowl |
Solved this by: |
Great @Vascal thanks a lot for the info. |
@Kogs -- thanks for the fix, that was it. Am still playing around with the new formatting options. |
as @Kogs said: var logger = winston.createLogger({
transports: transports
}); and if using older var logger = new winston.Logger({
transports: transports
}); |
Yep, but you need to keep in mind that also the transports are configured in a different way with |
This isn't really solved by installing older version of winston. It is only a temporary workaround.
|
@hiro5id I agree. The problem is not fixed thoroughly. I am using 'express-winston' in addition with 'winston' like this:
Here I'm using |
@makrandgupta what's the ETA for |
summoning @makrandgupta |
My apologies for going dark. I have had no time to work in this. Everything that I did is already pushed into the v3 branch. I could assist another developer make the port happen but won't be able to take point on this one. |
Oki doki @makrandgupta Any other volunteer? I’m gonna add a message to the Readme asking for contributors. |
Guys, I was able to get it running with this:
|
Getting an error when creating an instance of the logger? Anyone who has used this site, make sure to replace all instances of |
A PR was merged recently (#178) to clarify that the current version of express-winston only supports winston <3. I realize this "fix" is not ideal, but it does prevent users from seeing the error reported here and allows us to add winston@3 support when we're ready. Between the above change, and the fact that we have an issue open for adding winston@3 support (#163), I think this issue is redundant, so I'm going to close it. |
An exception is thrown when initializing express-winston, apparently the error is in:
express-winston/index.js
I think the latest update to Winston broke this build.
The text was updated successfully, but these errors were encountered: