Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nextjs runtime error #72

Open
rtgfxp opened this issue Jun 14, 2024 · 7 comments
Open

Nextjs runtime error #72

rtgfxp opened this issue Jun 14, 2024 · 7 comments

Comments

@rtgfxp
Copy link

rtgfxp commented Jun 14, 2024

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

@ranbuch
Copy link
Owner

ranbuch commented Jun 15, 2024

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.

@rtgfxp
Copy link
Author

rtgfxp commented Jun 15, 2024

I installed the new version, still getting this message
I will note that it upload but sometimes disappears, crashes
nextjs 14 - client component

@ranbuch
Copy link
Owner

ranbuch commented Jun 15, 2024

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.

@rtgfxp
Copy link
Author

rtgfxp commented Jun 15, 2024

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

@ranbuch
Copy link
Owner

ranbuch commented Jun 15, 2024

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.

@rtgfxp
Copy link
Author

rtgfxp commented Jun 15, 2024

In a development environment it does not uploaded at all
In a production environment it works correctly

@ranbuch
Copy link
Owner

ranbuch commented Jun 15, 2024

Again, I'm in the dark here. Please reproduce on Stackblitz or something similar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants