Jump to content
Search Community

ScrollTrigger tl.reverse() - get error

TELLO test
Moderator Tag

Recommended Posts

Hi all,

 

i was using this way in older projects. Now I get error with reverse() my timeline on Scrolltrigger:

 

const tl_hide_navi = gsap.timeline({paused: true});
tl_hide_navi
    .to('.naviTopLeft', {autoAlpha: 0, duration: 0.8}, 0)
    .to('.naviTopRight', {autoAlpha: 0, duration: 0.8}, 0)
;
gsap.timeline({
    scrollTrigger: {
        trigger: '.videoFrame',
        start: "top top",
        end: "center 50",
        scrub: true,
        markers: true,
        onEnter: () => tl_hide_navi.play(),
        onEnterBack: () => tl_hide_navi.play(),
        onLeave: () => tl_hide_navi.reverse(),
        onLeaveBack: () => tl_hide_navi.reverse(),
    }
})

Any idea why I get with the .reverse() now error in webpack?

Link to comment
Share on other sites

I get the error with tl.reverse() when compiling with webpack-encore. I expected its something with the GSAP V (3.10.4)? 

Failed to compile with 1 errors 
                                                                                                                                                                                                                                                                  10:59:37 PM
Module build failed: Module not found:
"./assets/website/app.js" contains a reference to the file "core-js/modules/es.array.reverse.js".
This file can not be found, please check it for typos or update it if the file got moved.
Entrypoint app [big] 1.61 MiB (43.2 KiB) = runtime.js 14 KiB vendors-node_modules_symfony_stimulus-bridge_dist_index_js-node_modules_gsap_ScrollTrigger_js-f96b38.js 1.57 MiB app.css 10.1 KiB app.js 14.7 KiB 1 auxiliary asset
Entrypoint _tmp_copy 14 KiB (11.6 MiB) = runtime.js 8 auxiliary assets
webpack compiled with 1 error


 

Link to comment
Share on other sites

Yeah, that definitely isn't related to GSAP. The error indicates it's trying to use some other js file called es.array.reverse.js. GSAP has absolutely no dependencies so that must be coming from somewhere else in your code. It's pretty much impossible for us to troubleshoot, though, just looking at a small code excerpt and error message. 

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