Nextjs runtime error
on loading with nextjs 14 I'm getting this runtime error: ⨯ node_modules\accessibility\dist\accessibility.js (124:0) @ eval ⨯ ReferenceError: window is not defined
It looks like you are trying to run the module in a Node.js environment, not on browser. Obviously it's meaningless.
Please try version 5.1.1 and let me know if the issue has been fixed.
I installed the new version, still getting this message I will note that it upload but sometimes disappears, crashes nextjs 14 - client component
There are 2 cenarios that I can think of that might results to this error message window is not defined. Running code on server side (node.js) or running code on a service or web worker (or any other headless mode). In any of those cases this code shouldn't be running as it depends on the DOM.
If you want me to investigate further please reproduce on stackblitz or something similar.
Because of the structure of NextJS, this environment also ran on NodeJS I run the component on client side (client component) and its run on the browser
I have no experience with NextJS but if you are getting this error the code is also running on your back-end. Please try version 5.1.3 and keep me posted.
In a development environment it does not uploaded at all In a production environment it works correctly
Again, I'm in the dark here. Please reproduce on Stackblitz or something similar.