reactjs - 反应 + gsap + scrollMagic
问题描述
这是一个代码框: 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
任何帮助,将不胜感激
解决方案
推荐阅读
- node.js - 如何模拟适用于 Node.js 的 AWS SDK v3?
- postgresql - 错误:功能 geography_eq 的权限被拒绝
- javascript - Dragula 已导入但无法正常工作。拉拉维尔
- reactjs - 如何在 NextJS 上插入查询字符串
- django - Django CSRF cookie 使用 axios 客户端发送图像
- google-cloud-platform - Cloud Functions 部署失败并显示“无法检索函数源代码”
- python - Python Selenium datepicker 不点击并超时
- python - 如何使用 f"{}" Python 简化代码
- android - Kotlin 中 AndroidStudio 中 GoogleMap 底部的简单窗口
- java - 是否可以将 Spring 应用程序属性值注入 @Jsonignore 注释?