-
Notifications
You must be signed in to change notification settings - Fork 41
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
Does not work on Next.js SSR/CSR #72
Comments
@kumarabhirup I'm not experienced with Next.js, but you are probably trying to use extension in server side with Node.js, right? Can you confirm this? If this is the case, I think I know the reason for |
If it works with Server Side, it’d be great, if it works on Client Side on
Next.js without errors that’d be great too haha
…On Thu, Aug 18, 2022 at 4:34 PM Hasan Balcı ***@***.***> wrote:
@kumarabhirup <https://github.com/kumarabhirup> I'm not experienced with
Next.js, but you are probably trying to use extension in server side with
Node.js, right? Can you confirm this? If this is the case, I think I know
the problem and I can fix it.
—
Reply to this email directly, view it on GitHub
<#72 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGCAOHWKQBMJ2KFX66PSJF3VZXRQNANCNFSM562P4QUQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
com>
|
@kumarabhirup I made a commit in unstable branch. Generally, |
@hasanbalci I am checking this out, and will let you know asap! |
@hasanbalci @kumarabhirup and I just tried using the unstable branch and we are still getting the same |
Could we get this revisited? I'm having the same error with Svelte currently, I would definitely like to see this resolved so I can integrate this awesome module. I also have SSR enabled, the Cytoscape instance isn't created until after the component is mounted, but the import statements are above that code, so my issue is likely the same as the one described above with Next.js. |
Any update on this? Has anybody figured out a workaround? |
I would like this as well |
import dynamic from 'next/dynamic'; const CytoscapeComponent = dynamic(() => import("cytoscape"), { const contextMenus = dynamic(() => import("cytoscape-context-menus"), { useEffect(() => { cytoscape.use(contextMenus); const cy = cytoscape({ // Other cytoscape logic }, []); |
I am trying to use this on Next.js v12 I get the
self is not defined
error.To fix that, I tried Next.js Dynamic, but the error persists in other ways.
I also tried this,
Am I missing something? Thank you!
The text was updated successfully, but these errors were encountered: