Share Posted March 17 I am using gsap with a vanilla Vite environment with Sass and npm install. The core plugin and the text plugin did work but not the ScrollTrigger plugin. What could be the problem? I am getting this error in the console: "gsap.js?v=3fc78497:84 Invalid property ScrollTrigger set to .star Missing plugin? gsap.registerPlugin()" I googled my problem but all the solutions I have found did not work for me. main.js file: import { gsap } from "gsap"; import { ScrollTrigger } from "gsap/ScrollTrigger"; gsap.registerPlugin(ScrollTrigger); gsap.from(".star", { duration: 3, rotation: -360, ScrollTrigger: ".star", }); html file: <!-- Hero --> <section class="hero"></section> <!-- Section-1 --> <section class="section-1"></section> <!-- Section-2 --> <section class="section-2"> <img class="star" src="/assets/img/star.svg" alt="" /> </section> <!-- Section-3 --> <section class="section-3"></section> <!-- Javascripts --> <script type="module" src="/main.js"></script> </body> </html> Link to comment Share on other sites More sharing options...
Solution Author Solution Share Posted March 17 Ah, I found the problem. I have to write scrollTrigger with a small s. 🧐 1 1 Link to comment Share on other sites More sharing options...
Share Posted March 18 Hi @Novaliz welcome to the forum! Happens to me as well! I usually then go to the Installation docs and copy the code from there, to be 100% it wasn't a spelling mistake. Happy tweening! 1 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