Jump to content


ScrollTrigger Plugin not working

Moderator Tag
Go to solution Solved by Novaliz,

Recommended Posts

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.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-3 -->
<section class="section-3"></section>
<!-- Javascripts -->
<script type="module" src="/main.js"></script>



Link to comment
Share on other sites

  • Solution

Ah, I found the problem. I have to write scrollTrigger with a small s. 🧐

  • Like 1
  • Haha 1
Link to comment
Share on other sites

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!

  • Like 1
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.