Oxygen deploy error because of gsap functions

Oxygen deploy error because of gsap functions

Jeffrey13
New Member
4 0 2

Hi, I get this error :

 

Jeffrey13_1-1678655815205.png

 

when I try to deploy my Hydrogen store with oxygen, vercel works fine.

I isolated the problem and it's coming from functions like those below, when used with GSAP. I commented them out and the deployment was successful.

 

Any clue on how to debug this kind of issue ?

 

 

  useEffect(() => {
    const cookiesAccepted = Cookies.get('cookiesAccepted');
    const consentPopup = consentPopupRef.current;
    if (cookiesAccepted) {
      setShowPopup(false);
    } else {
      setShowPopup(true);
      gsap.to(consentPopup, {
        translateY: 0,
        duration: 0.6,
        delay: 1,
        ease: Power2.easeOut,
      });
    }
  }, [showPopup]);
  const onTitleClick = (index) => {
    if (activeIndex === index) {
      setActiveIndex(-1);
      gsap.to(contentRefs.current[index], {
        height: 0,
        duration: 0.3,
        ease: Power1.easeIn,
      });
    } else {
      if (activeIndex !== -1) {
        gsap.to(contentRefs.current[activeIndex], {
          height: 0,
          duration: 0.3,
          ease: Power1.easeOut,
        });
      }

      setActiveIndex(index);
      gsap.set(contentRefs.current[index], {height: 'auto'});
      gsap.from(contentRefs.current[index], {
        height: 0,
        duration: 0.3,
        ease: Power1.easeOut,
      });
    }
  };
  useEffect(() => {
    const logo = logoRef.current;
    gsap.from(logo, {
      scaleY: 4,
      duration: 0.8,
    });
    gsap.to(logo, {
      translateY: 0,
      scaleY: 1,
      ease: Power4.easeOut,
      duration: 0.8,
    });
  });

 

 

 

 

Replies 0 (0)