Jump to content
Search Community

Donzo

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by Donzo

  1. Mystery resolved. Amazing how explaining a problem to someone (in this case, this forum) can immediately generate more ideas. It turns out that the .firstChild of my <div> container is not the first <div> inside it holding the stuff I want to animate. .firstChild is just a "text" node (equal to "\n "). I guess when the first arg to gsap.to() is not a "real" node but text, gsap will not accept any CSSPlugin properties such as "x". D-oh! let el_first = el_div_with_photos.children[0]; // Fixed! (Adding this here in case anyone else stumbles across this looking for an answer)
  2. First-time GreenSock user here struggling to fix this error message too. I'm trying (and prefer) NPM install and ES module. I have import { gsap } from "gsap"; // ... let el_first = el_div_with_photos.firstChild; gsap.to(el_first, { x: 200, duration: 2 }); ... which gives this error in Chrome's console: "gsap-core.js:87 Invalid property x set to 200 Missing plugin? gsap.registerPlugin()". I am running gsap 3.7.1 installed via NPM. Hugo (with its built-in ESbuild) bundles my JS. AlpineJS and AnchorJS are the only other libraries active on the page. The NPM setup must be okay otherwise gsap wouldn't get invoked. As you said, "no imports necessary". But still, I tried importing CSSPlugin and gsap.registerPlugin(CSSPlugin) just in case the NPM/import-way of no longer auto-registered CSSPlugin (as that plugin might not be needed or desired in some use cases). Still get the same error. Out of ideas here :(.
×
×
  • Create New...