Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Jacek Łudzik

Issue during building as well as deploying site in Gatsby

Recommended Posts

I'm trying to build and deploy my project in Gatsby but can't figure out how to solve this problem. Error seems to be made by ScrollTrigger. I tried to fire animation in if (window) statement as well as if (document) but it also generates error. Does anyone know what should I fix?

Zrzut ekranu 2020-07-7 o 18.16.02.png

Link to comment
Share on other sites

Hey Jacek and welcome to the GreenSock forums.

 

Can you please try to recreate the error in minimal form using CodeSandbox or something similar? 

 

Link to comment
Share on other sites

Yes, like Zach said a demo is necessary for us to troubleshoot. The error message seems (to me at least) to indicate that the target of whatever you're doing with GSAP/ScrollTrigger is undefined/null. Probably the scroller (which is the window by default). I bet your code is executing before the window is defined or you forgot to gsap.registerPlugin(ScrollTrigger) after the window exists. Just a guess. 

  • Like 1
Link to comment
Share on other sites

Maybe this?

 

Gatsby should probably have it's own little section on the installation page. Same with nuxt and next.js. I'd suggest making a demo repos for people to look at.

 

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

7 minutes ago, OSUblake said:

Gatsby should probably have it's own little section on the installation page. Same with nuxt and next.js. I'd suggest making a demo repos for people to look at.

If you want to write up something real quick and create some repos we're happy to include them! Otherwise it might be a bit before we get around to it.

Link to comment
Share on other sites

14 minutes ago, OSUblake said:

Maybe this?

 

Gatsby should probably have it's own little section on the installation page. Same with nuxt and next.js. I'd suggest making a demo repos for people to look at.

It solved my problem. Thank you!

14 minutes ago, OSUblake said:

 

 

Link to comment
Share on other sites

1 hour ago, ZachSaucier said:

If you want to write up something real quick and create some repos we're happy to include them! Otherwise it might be a bit before we get around to it.

 

Maybe @GreenSock can create an organization on github? Then I can just add repos to that, and it will be easy for people to find and improve them.

 

Link to comment
Share on other sites

1 minute ago, OSUblake said:

Maybe @GreenSock can create an organization on github?

I believe it is an org. Do you have to be added to it to contribute?

Link to comment
Share on other sites

1 minute ago, ZachSaucier said:

I believe it is an org. Do you have to be added to it to contribute?

 

Didn't know that. And yes, it would be easier to contribute. Otherwise I would have to get one of you to approve and merge everything.

 

 

Link to comment
Share on other sites

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.
×