@Hammaad-mi wish to know, have you installed gsap locally as a dependency in your project or you are pulling from the cdn,
another source of error might be that your gsap instance is not properly setup because i have run your code on my local machine and it works after some minor adjustments.
recomendations:
- Verify that you have gsap installed on your local system or if you are using a cdn, verify that your network is okay.
-Verify your gsap instance
- make sure your react and react-dom versions are :
"react": "^18.1.0",
"react-dom": "^18.1.0",