bilibili-live-ws: Uncaught (in promise) TypeError: packs.flatMap is not a function
大佬您好。
在electron-vue 项目中使用了 "bilibili-live-ws": "^5.1.1"
node -v :
v14.17.4
运行过程中提示:
Uncaught (in promise) TypeError: packs.flatMap is not a function
at Object.exports.decoder (F:\git_pro\muamuamua\node_modules\bilibili-live-ws\src\buffer.js:51)
buffer.js:
return packs.flatMap(pack => {
if (pack.protocol === 2) {
return pack.data;
}
return pack;
});
我改成:
packs.forEach(pack => {
if (pack.protocol === 2) {
pack = pack.data
}
});
return packs
倒是可以。 不过最近在使用GitHub 的 actions就又出现了。 QAQ
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (9 by maintainers)
我得写进readme😭
😨😨😨😨😨😨😨😨😨