Uncaught (in promise) TypeError: packs.flatMap is not a function
See original GitHub issue大佬您好。
在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
Issue Analytics
- State:
- Created 2 years ago
- Comments:15 (9 by maintainers)
Top Results From Across the Web
TypeError: flatMap is not a function in JavaScript | bobbyhadz
To solve the "flatMap is not a function" error, make sure to only call the flatMap method on arrays and in browsers that...
Read more >TypeError: xxx.flatMap is not a function - Stack Overflow
The variable dataset holds an object. You have to call flatMap on dataset.PFA.Entity . const body = dataset.PFA.Entity.
Read more >Object.entries(...).flatMap is not a function - Support
The last time my deploy worked was on May 10th and here's the deploy link working: Last working deploy Since then I have...
Read more >Node.js v19.3.0 Documentation
If asyncFn is a function and it throws an error synchronously, assert.doesNotReject() will return a rejected Promise with that error. If the function...
Read more >cannot read properties of undefined (reading 'flatmap')
packages /client/components/Dashboard.tsx in c at line 88:32 ... main.bundle.js:1 Uncaught TypeError: Cannot read properties of undefined (reading '__H') at ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
我得写进readme😭
😨😨😨😨😨😨😨😨😨