-
Notifications
You must be signed in to change notification settings - Fork 105
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
TypeError: winston_cloudwatch_1.default is not a constructor #104
Comments
Fixed in this way:
|
Hmmm do you really get that to compile? For me that results in |
This compiles but crashes because the typescript export doesn’t match the actual export:
|
I am having the same issue. |
for anyone else having this problem I found that this fixed it fro me: instead of
use require
|
In an ES6 node project and @parque-docs's solution is what only worked for me. Any reason why the docs shouldn't be updated? |
This comment was marked as resolved.
This comment was marked as resolved.
@dwilt No, other than that's an error :D, I've just updated it. Thanks. |
I am still getting Solved by calling |
use code in typescript
import * as winston from 'winston'
import WinstonCloudWatch from 'winston-cloudwatch'
export default winston.add(new WinstonCloudWatch({}))
after run tsc
TypeError: winston_cloudwatch_1.default is not a constructor
at Object. (D:\node-project\ais-cdg-gateway\build\utils\logger.js:5:31)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
The text was updated successfully, but these errors were encountered: