Error import module with TypeScript
in this section from 'node_module/@antv/g-base/lib/animate/timeline.js'
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var util_1 = require("@antv/util");
var d3Timer = require("d3-timer");
var d3_interpolate_1 = require("d3-interpolate"); // 目前整体动画只需要数值和数组的差值计算
show Error [ERR_REQUIRE_ESM] using SSR
Here is the detail of the error

could be changed to to correct it
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var util_1 = require("@antv/util");
var d3Timer = require("d3-timer");
const d3_interpolate_1 = async () => {
const { interpolate } = await import("d3-interpolate");
return interpolate;
};
node 18.12.1
im having same issue
im having same issue, but "name": "@antv/g-base", "version": "0.5.11" is ok
I'm having the same issue, guess it's because of this update https://github.com/antvis/G2/issues/4423#issuecomment-1343937049 I'm using "@antv/g2 version4.2.8", it worked well, but since I reinstalled my dependencies, it showed me the same error The nested dependency of "@antv/g2 version4.2.8" updated the major version, I can not solve this situation by locking version of @antv/g2 So, looking forward to a solution
I'm having the same issue. So, looking forward to a solution
Still no solution??
I'm also looking for a solution to this
Do you really want it to run on server side?
- if yes, maybe you should transpile dependencies. for example in vue3. you can add below to vue.config.js;
transpileDependencies: ["@antv/*"] - if no, maybe you can just import the lib only in client side. for example, only import in mounted hooks.
I hava this problem too