-
Notifications
You must be signed in to change notification settings - Fork 352
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
🧐[问题] JavaScript heap out of memory #320
Comments
应该是 ant-design-pro 底层有其它图表库, CDN 的方式试试 https://charts.ant.design/guide/start#cdn |
试了下CDN,开始可用,但是再编译下又挂了,直接用g2plot 就不会,不过还是react这种方便点,不用考虑container 和 id |
有同样的困扰, 怎么搞 |
能提供一下复现代码吗? |
@lxfu1 遇到了同样的问题,现象就是引入了@ant-design/charts以后,项目就无法编译打包了。 |
hi! I have followed what the suggestion of @lxfu1 but I still can not make it work. Is there another way to overcome this error? I have tried many things already and the only thing that worked was to remove this library.... crazy... |
import { Bar } from '@ant-design/plots' |
@lxfu1 thank you for your quick reply. I am using 'Column' and already importing in this way: In my package.json I have added a script as suggested by the link you have shared: And this is the error log:
|
Webpack externals? |
@lxfu1 don't think so, but why would it be ? When removing ant it works as usual, I don't even need to add more memory to Webpack. |
@lxfu1 I am actually using create-react-app, where the configuration of Webpack is kind of hidden and when possible, avoid to eject. I have added webpack cli because that was the only way I could give more mem to the build. Is there another way of doing this? |
I might have a fix which works well in my case. I used dynamic import and added this to the build script in the package.json file: I am using React.lazy to import the Component I need on demand:
|
🧐 问题描述 [详细地描述问题,让大家都能理解]
直接 import { Bar } from '@ant-design/charts'; 服务就挂了,然后出现内存溢出
💻 示例代码 [如果有必要,展示代码,线上示例,或仓库]
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 00007FF75ADA121A v8::internal::GCIdleTimeHandler::GCIdleTimeHandler+4810
2: 00007FF75AD7A5B6 node::MakeCallback+4518
3: 00007FF75AD7AFA0 node_module_register+2160
4: 00007FF75B00B3EE v8::internal::FatalProcessOutOfMemory+846
5: 00007FF75B00B31F v8::internal::FatalProcessOutOfMemory+639
6: 00007FF75B549304 v8::internal::Heap::MaxHeapGrowingFactor+11476
7: 00007FF75B53FA67 v8::internal::ScavengeJob::operator=+25543
8: 00007FF75B53DFDC v8::internal::ScavengeJob::operator=+18748
9: 00007FF75B546F57 v8::internal::Heap::MaxHeapGrowingFactor+2343
10: 00007FF75B546FD6 v8::internal::Heap::MaxHeapGrowingFactor+2470
11: 00007FF75B0E9A5B v8::internal::Factory::AllocateRawWithImmortalMap+59
12: 00007FF75B0EC55D v8::internal::Factory::NewRawTwoByteString+77
13: 00007FF75B1CCEEB std::vector<v8::internal::compiler::MoveOperands * __ptr64,v8::internal::ZoneAllocator<v8::internal::compiler::MoveOperands * __ptr64> >::empty+56779
14: 00007FF75B51111F v8::internal::interpreter::operator<<+59679
15: 00007FF75B50F0F2 v8::internal::interpreter::operator<<+51442
16: 00007FF75B50D56D v8::internal::interpreter::operator<<+44397
17: 00007FF75B50A58C v8::internal::interpreter::operator<<+32140
18: 00007FF75B1D9D46 v8::internal::CodeStubAssembler::ConstexprBoolNot+39446
19: 00007FF75B1D9C3B v8::internal::CodeStubAssembler::ConstexprBoolNot+39179
20: 0000035F1C5DC721
🚑 其他信息 [如截图等其他信息可以贴在这里]
react: 16.8.0,
ant-design-pro: v2
可能的原因是?
The text was updated successfully, but these errors were encountered: