antvis/G2

medianIndex is not exported from d3-array, causing import error in @antv/g2 #6479

Hec-gitHub posted onGitHub

问题描述

I encountered an error when trying to compile my project using @antv/g2. The error message is as follows:

Steps to Reproduce

  1. Install @antv/g2 and d3-array@2.12.1
  2. Attempt to compile the project

Expected Behavior

The project should compile without errors.

Actual Behavior

The compilation fails with the error message mentioned above.

Environment

  • Node.js version: 18.20.4
  • @antv/g2 version: 5.2.5
  • d3-array version: 2.12.1

Additional Information

It appears that medianIndex is not exported from d3-array. Here is the output of Object.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

平台

  • 操作系统: Linux

屏幕截图或视频(可选)

No response

补充说明(可选)

No response


fixed in 5.2.11, we re-pack all the d3-* packages in @antv/vendor.

posted by hustcc 2 months ago

Fund this Issue

$0.00
Funded

Pull requests