Fatal error happens when compiling react. FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed.
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- JavaScript
- Star
- 11.8k
- Fork
- 7.9k
- Merge trung bình
- 1 ngày 11 giờ
- Pull request đã merge (30 ngày)
- 11
Mô tả
When I try to compile my some not small react project, this error happens.
But, it is not always, and sometimes happens, sometimes not happens,
But along time goes, it happens more often.
There, node_modules\webpack\lib\Stats.js can be other js file, ex. formatLocation.js
Whenever this error happens, yarn service is terminated, and i should do 'yarn start' again.
Could you help me to fix this error?
Compiling...
<--- Last few GCs --->
[16224:000002AF7B7C2B00] 324452 ms: Mark-sweep 1320.5 (1444.2) -> 1306.6 (1442.7) MB, 440.9 / 0.0 ms (average mu = 0.219, current mu = 0.127) allocation failure scavenge might not succeed
[16224:000002AF7B7C2B00] 324998 ms: Mark-sweep 1324.4 (1442.7) -> 1315.9 (1441.2) MB, 465.5 / 0.1 ms (average mu = 0.183, current mu = 0.146) allocation failure scavenge might not succeed
<--- JS stacktrace --->
==== JS stack trace =========================================
0: ExitFrame [pc: 00000000B315C5C1]
1: StubFrame [pc: 00000000B315DB86]
Security context: 0x03fce051e6e9
2: /* anonymous /(aka / anonymous */) [0000000D1F8A6029] [MY_REACT_PROJECT_PATH\node_modules\webpack\lib\Stats.js:~540] [pc=00000000B4EF33D1](this=0x00e61e9826f1 ,reason=0x02c010a6c041 )
3: arguments adaptor frame: 3->1
4: map [000003FCE0506E61](this=0x022e...
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 00007FF72344C6AA v8::internal::GCIdleTimeHandler::GCIdleTimeHandler+4506
2: 00007FF723427416 node::MakeCallback+4534
3: 00007FF723427D90 node_module_register+2032
4: 00007FF72374189E v8::internal::FatalProcessOutOfMemory+846
5: 00007FF7237417CF v8::internal::FatalProcessOutOfMemory+639
6: 00007FF723927F94 v8::internal::Heap::MaxHeapGrowingFactor+9620
7: 00007FF72391EF76 v8::internal::ScavengeJob::operator=+24550
8: 00007FF72391D5CC v8::internal::ScavengeJob::operator=+17980
9: 00007FF723926317 v8::internal::Heap::MaxHeapGrowingFactor+2327
10: 00007FF723926396 v8::internal::Heap::MaxHeapGrowingFactor+2454
11: 00007FF723A50637 v8::internal::Factory::NewFillerObject+55
12: 00007FF723ACD826 v8::internal::operator<<+73494
13: 00000000B315C5C1
error Command failed with exit code 134.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện lỗi biên dịch được báo cáo và kiểm tra vị trí của stack trace trong node_modules\webpack\lib\Stats.js quanh dòng 540. So sánh luồng biên dịch với lệnh yarn start và đầu ra heap-error được cung cấp; được xem là hoàn tất khi dự án React biên dịch mà không chấm dứt dịch vụ yarn.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript, nodejs, react, webpack
- Lĩnh vực
- build-system, tooling
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 20/100