-
-
Notifications
You must be signed in to change notification settings - Fork 93
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
window is not defined #52
Comments
It's the server side rendering that causes problems. Maybe this is worth a try: https://stackoverflow.com/questions/56319997/nextjs-window-is-not-defined |
Is there any other debug outpout (or specific code location) you can pull out from the log? Or can you set up a demo project that reproduces the issue? The But, in any case, if you can find any information on which reference to |
Hi rsimon, Thank you for your quick reply! I did tried out the method as recommended in the stackoverflow but there is a new error that came up after that. Below is my following codes: |
Good, one step further ;-) Hm, depending on how you import, it would have to be either const anno = new Annotorious({ ... }); or const anno = Annotorious.init({ ... }); Can you log the |
Was there ever a solution for this? I am dealing with same issue....and mine is for NuxtJS (vs NextJS). |
I can't really provide any useful input here, I'm afraid. But it's definitely related to server-side rendering (where there is no |
Thanks. I solved it this morning for NuxtJS. I had to follow this part of the NuxtJS Docs: So my code looks like this:
So, in my app's components, I can call Annototorious anywhere. Here's an example:
all good now! |
Closing due to 6 months+ of inactivity. |
Hi,
I am trying to integrate this module into my NextJs web application but I am facing this error message "window is not defined" while trying to import the module. Is there any solution for this?
Below is my code:
import { Annotorious } from "@recogito/annotorious";
Below is the error message:
`Server Error
ReferenceError: window is not defined
This error happened while generating the page. Any console logs will be displayed in the terminal window.
Source
external%20%22@recogito\annotorious%22 (1:0) @ Object.@recogito/annotorious
Please help, thank you!
The text was updated successfully, but these errors were encountered: