2👍
✅
I’m not sure why you get that particular error but one issue could be that the anonymous function you’re passing into the forEach() is not an async function.
Try async (element) => { ...
I would avoid having async functions where you’re not tracking the result of whether they’re complete. You could probably wrap them into a Promise.all() or something like that to know if they’ve completed or not.
👤Rob
Source:stackexchange.com