Fatal error happens when compiling react. FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed.
Ninguém assumiu esta issue ainda.
- Linguagem predominante
- JavaScript
- Estrelas
- 11.8k
- Forks
- 7.9k
- Merge médio
- 1d 11h
- PRs com merge (30d)
- 11
Descrição
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.
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Direção de pesquisa
Comece reproduzindo a falha de compilação relatada e inspecione a localização do stack trace em node_modules\webpack\lib\Stats.js por volta da linha 540. Compare o fluxo de compilação com o comando yarn start e a saída heap-error fornecida; considera-se concluído quando o projeto React compila sem encerrar o serviço yarn.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- javascript, nodejs, react, webpack
- Domínio
- build-system, tooling
- Tipo de issue
- Bug
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Status de atividade
- Estagnada
- Clareza
- Precisa de esclarecimento
- Facilidade para iniciantes
- 20/100