Jump to content
Search Community

React, Next.js and GSAP issues - possible fixes for SSR

gogo125 test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hi @GreenSock , using Next.js version 10  (most recently big update) I wasn't able to load the plugins as described in docs. After trying all the solutions posted here, i was able to do it like this: 

image.png.4e9a1fba986ad33fda99f4da9a5a39f8.png

 

With the default next.config.js. But this way, when i try to create a draggable object, this error rises:

 

image.png.d36b36b3bd82dc7f9c3e7a1a36b9b8d4.png

 

 

This is the collapsed error stack

image.png.cca696597ede316c4bc984b458fbb6c5.png

 

Thanks in advance for any feedback on this

Link to comment
Share on other sites

Yeah, a demo would be super helpful. It sounds like maybe the framework you're using flagged elements with preventExtensions() which is quite a bummer. Do you know why they chose to do that? It definitely complicates things. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Cant_define_property_object_not_extensible

Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...