antvis/G6
The issue has been closed
require() of ES Module #4386
ethan-xiao posted onGitHub
问题描述
在删除node_modules和package-lock.json后安装g6总是出现require() of ES Module的问题。最后发现是g-base 0.5.14相关依赖引起的,最后直接修改package-lock.json解决,将相关依赖都降至g-base 0.5.11能够兼容的版本后页面能够正常显示了。 本地环境: SSR node.js 16.19.1 npm 8.1.39 vue3 quasar framework 2.11.8 @quasar/app-webpack 3.7.2 webpack 5 g6 4.6.4和4.8.7都尝试过
重现链接
重现步骤
进入g6页面就会报错,没有做重现链接,新手不太会玩
预期行为
期望页面能够正常显示,但是总出现报错: require() of ES Module <path>/node modules/d3- interpolate/src/index.js from <path>/node modules/@antv/g-base/lib/animate/timeline.js not supported. Instead change the require of index.js in <path>/node modules/@antv/g-base/lib/animate/timeline.js to a dynamic import0) which is available inall CommonJS modules.
平台
- 操作系统: macOS
- 网页浏览器: Google Chrome
- G6 版本: 4.6.4, 4.8.7
屏幕截图或视频(可选)
No response
补充说明(可选)
No response