accessibility
accessibility copied to clipboard
ReferenceError: regeneratorRuntime is not defined
Hi I am using this tool in my Nuxt3 project.
But when I executed npm run dev, I encountered the following problem. I guessed it was because my dependency library version was too high, but I don't know which dependency it is. . . Could you please help me to have a look?
My dependencies are as follows:
ReferenceError: regeneratorRuntime is not defined 12:09:24
at D:\projects\develop\demo\node_modules\accessibility\dist\main.js:768:56
at D:\projects\develop\demo\node_modules\accessibility\dist\main.js:871:6
at Object.
Here are my previous dependencies, and accessibility works fine when using these dependencies.
still facing the same issue in next js
@hmingv I have no idea. Perhaps this could help?
I had the same issue on an older Angular app, fixed it by installing regenerator-runtime and adding the next lines to polyfills.ts
import "core-js/es6";
import "regenerator-runtime/runtime";
Having this issue in Next 13.4.19. I haven't found a workaround as yet, but will post if/when I do
Having this issue in Next 13.4.19. I haven't found a workaround as yet, but will post if/when I do
Did you find any fix for this ?
Having this issue in Next 13.4.19. I haven't found a workaround as yet, but will post if/when I do
Did you find any fix for this ?
Sadly not. I mostly needed it for text-to-speech, and found a different package that fit my needs (speak-tts)
@hmingv @mtahirgulzar @georgescubogdan @owain-williams @noumanmoeen0 I believe I've fixed this issue on version 4.5.9
. Please give it a try if you still in search for an accessibility solution.
Thank you very much for your continued attention to this Issue.
I'm excited to test the new version and bring you feedback.
Let me introduce you to my project environment: Nuxt project info: 11:40:53
- Operating System: Windows_NT
- Node Version: v20.1.0 -Nuxt Version: 3.10.3
- CLI Version: 3.10.1
- Nitro Version: 2.8.1
- Package Manager: [email protected]
- Builder: -
- User Config: devtools, modules, typescript, eslint, runtimeConfig
- Runtime Modules: @pinia/[email protected], @nuxtjs/[email protected], @nuxtjs/[email protected]
- Build Modules: -
I followed the documentation and here is what I did:
I got the following error:
Thank you for the effort @hmingv!
unfortunately the provided link to codesandbox.io doesn't work for me. Perhaps it's private (I'm not familiar with codesandbox
)?
Please try to install version 4.5.10
end let me know how it goes.
Oh, sorry, I shared the private link by mistake, the following link is public link
https://codesandbox.io/p/devbox/serene-shamir-fmm99j?file=%2Fapp.vue%3A6%2C1
Version 4.5.10 got new error message:
When I set the page to Client-Side rendering, I got the following error:
@hmingv I was able to access and run the codesandbox
app. I believe I have forked it and made a few changes.
- Updated to version
4.5.11
. - Made sure the older version is not cached by editing the
nuxt.config
file by adding this section:
vite: {
optimizeDeps: {
exclude: [
'date-fns'
]
}
}
- Edited the
app.vue
by removing thewindow.addEventListener
as theonMounted
event is being triggered after the window has already loaded (so just callnew Accessibility();
immediately).
Thanks for fixing this, it looks good now.
It’s just that this dependency uses window, so it does not support SSR. I added a new Nuxt Plugin to load it on the client, and it can be used normally now. Thank you.
https://codesandbox.io/p/devbox/serene-shamir-fmm99j?file=%2Fapp.vue%3A6%2C1