You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] regeneratorRuntime is not defined with useAsyncTask #51
Strange. This should definitely not happen at least if the modern build is
used where async await is not transpiled. I'll look into this tomorrow.
Dne st 21. 7. 2021 19:50 uživatel Connor Dooley ***@***.***>
napsal:
I want to use useAsyncTask like so:
const myAsyncTask = useAsyncTask(() => {
return functionThatReturnsPromiseWithMyData('this is an argument')})
but when I try to run this, I get Uncaught (in promise) ReferenceError:
regeneratorRuntime is not defined
I am using vue 3.1.4, vite 2.4.1, and vue-concurrency 2.1.2
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#51>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACIHW6MIBZUWAIUZKCWEQHDTY4CFRANCNFSM5AYN3HJA>
.
Caused by developit/microbundle#708. I tried to update microbundle but ran into different errors afterwards. I'll give it another try when I have more time.
Activity
MartinMalinda commentedon Jul 21, 2021
nickngqs commentedon Aug 6, 2021
I'm getting this bug as well, with usePipeTask.
vite 2.1.3, vue 3.2.0, vue-concurrency 2.1.2
eLoyyyyy commentedon Aug 20, 2021
same behavior with
usePipeTask.MartinMalinda commentedon Sep 23, 2021
Caused by developit/microbundle#708. I tried to update microbundle but ran into different errors afterwards. I'll give it another try when I have more time.
torleifhalseth commentedon Mar 15, 2022
Any updates on this @MartinMalinda?
amrap030 commentedon Apr 19, 2022
I have this error too in a vue 3 project. I also tried pasting your example from the test as shown below and still have the same error:
When i remove the last line, I get no errors. This makes the library unfortunately unusable for me.
Hawxy commentedon Jun 29, 2022
With Vue 3 & Vite I've been using the temporary fix of :
npm install regenerator-runtimeimport 'regenerator-runtime/runtime'at the top ofmain.tsIf you're using webpack/babel (ie Vue 2), you can also import it directly without the extra package:
import '@babel/runtime/regenerator';MartinMalinda commentedon Feb 6, 2024
Since
viteis used to bundle the lib now, there's a good chance it's fixed in 5.0. Can anyone confirm?Hawxy commentedon Feb 7, 2024
Yes this is fixed.