Jump to content
Search Community

is GSAP compatible with Remix + Cloudflare Pages?

nick_east test
Moderator Tag

Recommended Posts

Everything is working as expected in development but production builds fail with this error message;

 

Error: Failed to publish your Function. Got error: Uncaught Error: Some functionality, such as asynchronous I/O, timeouts, and generating random values, can only be performed while handling a request. at worker.mjs:26191:14 in c at worker.mjs:26181:187 in v at worker.mjs:26192:16 in wake at worker.mjs:26209:20 in C7 at worker.mjs:26112:7 in T61 at worker.mjs:26991:12 at worker.mjs:26990:5 in registerPlugin at worker.mjs:27495:4

 

 

When I remove the gsap import statement build will resume as normal. 

 

Has anyone experienced this issue while using Cloudflare pages?

Link to comment
Share on other sites

Hi @nick_east and welcome to the GreenSock forums!

 

Sorry to hear about the troubles you're having. Unfortunately I have no experience with Cloudflare pages so I can't give you any advice on that. The error you are reporting though indicates some issue with the registerPlugin method. Are you registering all your GSAP plugins in your development environment? Maybe a plugin is being flushed out in the building process due to tree shaking and then is missing.

 

I'll ping @GreenSock so He can take a look at this and hopefully shed more light on this.

 

Sorry I can't be of more assistance regarding this.

 

Happy Tweening!

Link to comment
Share on other sites

Yeah, I've never heard of that before and I cannot imagine what the issue could be unless they have some kind of prohibition against any code that has Math.random() (which of course gsap.utils.random() uses). 🤷‍♂️

 

GSAP is used on over 11 million sites and Cloudflare hosts the library and serves it literally billions of times each month and we've never had someone report something like this, so it would seem rather odd if they suddenly stopped allowing Math.random() in GSAP. I don't even know if that's the issue, I'm completely guessing. It's tough to diagnose without a clear minimal demo. Maybe it's just some kind of configuration issue in your bundler? 

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.
×
×
  • Create New...