Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛[BUG]Errors in @antv/g2 with missing exports from fmin #2796

Closed
malcoded opened this issue Dec 8, 2024 · 4 comments
Closed

🐛[BUG]Errors in @antv/g2 with missing exports from fmin #2796

malcoded opened this issue Dec 8, 2024 · 4 comments

Comments

@malcoded
Copy link

malcoded commented Dec 8, 2024

🐛 bug 描述 [详细地描述 bug,让大家都能理解]

When compiling a project using @antv/g2, the following errors occur due to missing exports in the fmin module:

https://github.com/user-attachments/assets/9c1d6e2b-0023-4d3b-9f56-9a8759e439fd

export 'nelderMead' (imported as 'nelderMead') was not found in 'fmin' (module has no exports)
ERROR in ./node_modules/@antv/g2/esm/data/utils/venn/layout.js 57:9-15
export 'bisect' (imported as 'bisect') was not found in 'fmin' (module has no exports)
ERROR in ./node_modules/@antv/g2/esm/data/utils/venn/layout.js 106:20-26
export 'zerosM' (imported as 'zerosM') was not found in 'fmin' (module has no exports)
ERROR in ./node_modules/@antv/g2/esm/data/utils/venn/layout.js 107:18-24
export 'zerosM' (imported as 'zerosM') was not found in 'fmin' (module has no exports)
ERROR in ./node_modules/@antv/g2/esm/data/utils/venn/layout.js 202:15-20
export 'norm2' (imported as 'norm2') was not found in 'fmin' (module has no exports)
ERROR in ./node_modules/@antv/g2/esm/data/utils/venn/layout.js 202:35-40
export 'norm2' (imported as 'norm2') was not found in 'fmin' (module has no exports)
ERROR in ./node_modules/@antv/g2/esm/data/utils/venn/layout.js 213:20-25
export 'zeros' (imported as 'zeros') was not found in 'fmin' (module has no exports)
ERROR in ./node_modules/@antv/g2/esm/data/utils/venn/layout.js 214:14-31
export 'conjugateGradient' (imported as 'conjugateGradient') was not found in 'fmin' (module has no exports)
ERROR in ./node_modules/@antv/g2/esm/data/utils/venn/layout.js 232:6-11
export 'scale' (imported as 'scale') was not found in 'fmin' (module has no exports)```
### 📷 复现步骤 [清晰描述复现步骤,让别人也能看到问题]
install ```"@ant-design/charts": "^2.1.0",
    "@ant-design/plots": "^2.2.1",```
### 🏞 期望结果 [描述你原本期望看到的结果]

### 💻 复现代码 [提供可复现的代码,仓库,或线上示例]

### © 版本信息

	•	OS:  macOS 15.1.1
	•	Node.js version: 20.10.0
	•	Package manager: Yarn
	•	@ant-design/charts": "^2.1.0"
        •	"@ant-design/plots": "^2.2.1"

[Error image](
### 🚑 其他信息 [如截图等其他信息可以贴在这里]
@zHElEARN
Copy link

zHElEARN commented Dec 9, 2024

same problem

@Kavsar-RA
Copy link

getting same problem since 3 days

@malcoded
Copy link
Author

malcoded commented Dec 9, 2024

A workaround for me was to add this in package.json
"resolutions": { "fmin": "0.0.2"}

  • Remove node_modules
  • Remove yarn.lock, packegelock, or pnpm-lock.yaml

Then run

  • install yarn

@hustcc
Copy link
Collaborator

hustcc commented Dec 9, 2024

@lxfu1 lxfu1 closed this as completed Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants