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

v2.2.1 Cannot read properties of undefined (reading 'create') #21

Closed
bgavas opened this issue Oct 6, 2022 · 7 comments
Closed

v2.2.1 Cannot read properties of undefined (reading 'create') #21

bgavas opened this issue Oct 6, 2022 · 7 comments

Comments

@bgavas
Copy link

bgavas commented Oct 6, 2022

I am using "winston": "^3.3.3" and "winston-slack-webhook-transport": "^2.1.0". After your version update today, I had to fix the version to "2.1.0". Otherwise I am getting Cannot read properties of undefined (reading 'create') on PRODUCTION which is really annoying.

TypeError: Cannot read properties of undefined (reading 'create')
    at new SlackHook (/Users/my-path/node_modules/winston-slack-webhook-transport/slackHook.js:24:32)
    at Object.<anonymous> (/Users/my-path/src/utils/helpers/logger.helper.ts:78:5)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Module.m._compile (/Users/my-path/node_modules/ts-node/src/index.ts:1056:23)
    at Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Object.require.extensions.<computed> [as .ts] (/Users/my-path/node_modules/ts-node/src/index.ts:1059:12)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:827:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
@TheAppleFreak
Copy link
Owner

Thanks for letting me know about this! Giving it a look now.

@bgavas
Copy link
Author

bgavas commented Oct 6, 2022

Thanks for letting me know about this! Giving it a look now.

I am using "axios": "^0.21.1" in my project. The reason may be the change in axios' version where you upgraded to 1.0.0

@TheAppleFreak
Copy link
Owner

TheAppleFreak commented Oct 6, 2022

Yeah, that's my guess too. I'm reading over the axios changelog and documentation right now to see if the API changed, but it doesn't appear as if my code is doing anything wrong. Figure it's probably best to roll back to a known good axios release for the time being.

I'll get that change made and pushed in a few minutes. Sorry about the issues!

@bgavas
Copy link
Author

bgavas commented Oct 6, 2022

Thanks for your quick help. Cheers

@TheAppleFreak
Copy link
Owner

Alright, v2.2.2 has been published! It reverts the axios version change. Can you try that version and confirm if it's working for you?

@bgavas
Copy link
Author

bgavas commented Oct 6, 2022

Yeah, I tested it and it is working. Thanks!

@TheAppleFreak
Copy link
Owner

Excellent! Again, thank you for letting me know about this.

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