这是一个代码箱:https://codesandbox.io/s/greensock-and-scrollmagic-with-react-gmidc,我在这里使用React与GSAP和ScrollMagic。但是当我在本地主机上运行代码时,会出现一个错误:
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任何帮助都将不胜感激
发布于 2019-11-27 15:50:16
https://stackoverflow.com/questions/59030940
复制相似问题