TELLO Posted July 17, 2022 Share Posted July 17, 2022 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 More sharing options...
SteveS Posted July 17, 2022 Share Posted July 17, 2022 Looks good to me. I did something similar recently. Can you put it into a codepen or tell us what error you are getting? 1 Link to comment Share on other sites More sharing options...
TELLO Posted July 17, 2022 Author Share Posted July 17, 2022 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 More sharing options...
SteveS Posted July 18, 2022 Share Posted July 18, 2022 @TELLO Something with your environment. It's trying to use JS reverse instead of GSAP and then not finding it or something like that. Try to fresh install your env and see if that helps. Link to comment Share on other sites More sharing options...
GreenSock Posted July 18, 2022 Share Posted July 18, 2022 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now