Here's a codesandbox: https://codesandbox.io/s/greensock-and-scrollmagic-with-react-gmidc where I use React with GSAP and ScrollMagic. BUT when I run the code on the local host there's an error that says:
animation.gsap.js:32 Uncaught Error: Cannot find module 'ScrollMagic'
at webpackMissingModule (animation.gsap.js:32)
at animation.gsap.js:32
at Object../node_modules/scrollmagic/scrollmagic/uncompressed/plugins/animation.gsap.js (animation.gsap.js:43)
at __webpack_require__ (bootstrap:785)
at fn (bootstrap:150)
at Module../src/index.js (import-fonts.css?480e:37)
at __webpack_require__ (bootstrap:785)
at fn (bootstrap:150)
at Object.0 (typography.css?5564:37)
at __webpack_require__ (bootstrap:785)
at checkDeferredModules (bootstrap:45)
at Array.webpackJsonpCallback [as push] (bootstrap:32)
at main.chunk.js:1
Any help would be appreciated
ScrollMagic
properly added to your package.json? Are you usingcreate-react-app
?