huan/state-switch

TypeError getLoggable is not a function

Closed this issue · 5 comments

brolog ^1.13.6 not exist function getLoggable, throw error:
TypeError: (0 , brolog_1.getLoggable) is not a function
https://github.com/huan/state-switch/blob/main/src/state-switch.ts#L12

huan commented

Please upgrade brolog@1.14+, or wait for the updated state-switch@1.6.3+ to fix this dependency problem.

I'm having this error with the latest version of wechaty-puppet-wechat, which depends on state-switch@1.6.1, no other way to fix this problem unless I build and replace state-switch manually. Please upgrade the dependency on wechaty-puppet-wechat too.

huan commented

Would you like to help us by sending a PR to upgrade the state-switch dependency version to 1.6.3 in the wechaty-puppet-wechat package.json?

I believe the problem can be fixed after this upgrade.

Here is the PR wechaty/puppet-wechat#188
I have found my mistake that the brolog version is still 1.12.4 in node_modules caused this error. After removing the yarn.lock and reinstalling again, I fix this problem.

huan commented

Great to know that you have solved your problem, cheers!