Open Hec-gitHub opened 1 month ago
use d3-array@^3
use d3-array@^3
Thank you very much for re.I'll try.
use d3-array@^3
I tried to install version 3.2.4 and the above error was resolved, but another error occurred while compiling the project. The specific compilation error is as follows:
`- info Creating an optimized production build
Error [ERR_REQUIRE_ESM]: require() of ES Module /data/git/DB-GPT/web/node_modules/d3-array/src/index.js from /data/git/DB-GPT/web/node_modules/d3-geo/dist/d3-geo.js not supported.
Instead change the require of index.js in /data/git/DB-GPT/web/node_modules/d3-geo/dist/d3-geo.js to a dynamic import() which is available in all CommonJS modules.
at /data/git/DB-GPT/web/node_modules/d3-geo/dist/d3-geo.js:3:81
at Object.
Build error occurred Error: Failed to collect page data for /construct/app/extra/components/auto-plan/DetailsCard at /data/git/DB-GPT/web/node_modules/next/dist/build/utils.js:1161:15 at processTicksAndRejections (node:internal/process/task_queues:96:5) { type: 'Error' } error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.`
error of d3 in nextjs. https://github.com/d3/d3-array/issues/218
问题描述
I encountered an error when trying to compile my project using @antv/g2. The error message is as follows:
Steps to Reproduce
Expected Behavior
The project should compile without errors.
Actual Behavior
The compilation fails with the error message mentioned above.
Environment
Additional Information
It appears that
medianIndex
is not exported fromd3-array
. Here is the output ofObject.keys(require('d3-array'))
: [ 'Adder', 'InternMap', 'InternSet', 'ascending', 'bin', 'bisect', 'bisectCenter', 'bisectLeft', 'bisectRight', 'bisector', 'count', 'cross', 'cumsum', 'descending', 'deviation', 'difference', 'disjoint', 'every', 'extent', 'fcumsum', 'filter', 'fsum', 'greatest', 'greatestIndex', 'group', 'groupSort', 'groups', 'histogram', 'index', 'indexes', 'intersection', 'least', 'leastIndex', 'map', 'max', 'maxIndex', 'mean', 'median', 'merge', 'min', 'minIndex', 'nice', 'pairs', 'permute', 'quantile', 'quantileSorted', 'quickselect', 'range', 'reduce', 'reverse', 'rollup', 'rollups', 'scan', 'shuffle', 'shuffler', 'some', 'sort', 'subset', 'sum', 'superset', 'thresholdFreedmanDiaconis', 'thresholdScott', 'thresholdSturges', 'tickIncrement', 'tickStep', 'ticks', 'transpose', 'union', 'variance', 'zip' ] Please provide guidance on how to resolve this issue.重现链接
No response
重现步骤
No response
预期行为
No response
平台
屏幕截图或视频(可选)
No response
补充说明(可选)
No response