Skip to content

GSAP not working with Hydrogen2 & Oxygen #494

Answered by frandiox
joevingracien asked this question in Help
Discussion options

You must be logged in to vote

It looks like this is an issue in GSAP itself.

When you use the Hydrogen CLI, it runs your app in a worker environment (Oxygen) instead of Node.js. Workers don't allow calling setTimeout outside of request cycles (i.e. the fetch export). However, GSAP calls setTimeout at import time and it breaks the worker.

Edit: See the comments below for a workaround.

Replies: 1 comment 10 replies

Comment options

You must be logged in to vote
10 replies
@frehner
Comment options

frehner Feb 14, 2023
Collaborator

@juanpprieto
Comment options

@frandiox
Comment options

@joevingracien
Comment options

@juanpprieto
Comment options

Answer selected by blittle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
4 participants