React scripts build
#13398
Replies: 1 comment
-
@Rasul8215 try this command |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Working on a react project. when I try to run npm run build it shows java script heap out of memory error.
<--- Last few GCs --->
[6308:00000184A6AB2410] 4698460 ms: Scavenge 2032.5 (2072.7) -> 2032.0 (2083.0) MB, 8.5 / 19.9 ms (average mu = 0.455, current mu = 0.302) allocation failure;
[6308:00000184A6AB2410] 4700020 ms: Mark-sweep (reduce) 2036.9 (2083.2) -> 2036.3 (2073.5) MB, 874.2 / 0.0 ms (+ 428.4 ms in 75
steps since start of marking, biggest step 42.0 ms, walltime since start of marking 1373 ms) (average mu = 0.344, current mu
<--- JS stacktrace --->
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
1: 00007FF7E7C207BF node_api_throw_syntax_error+175823
2: 00007FF7E7BA5796 DSA_meth_get_flags+59654
3: 00007FF7E7BA7480 DSA_meth_get_flags+67056
4: 00007FF7E864E944 v8::Isolate::ReportExternalAllocationLimitReached+116
5: 00007FF7E8639CD2 v8::Isolate::Exit+674
6: 00007FF7E84BBB8C v8::internal::EmbedderStackStateScope::ExplicitScopeForTesting+124
7: 00007FF7E84B8DAB v8::internal::Heap::CollectGarbage+3963
8: 00007FF7E84C0A05 v8::internal::Heap::GlobalSizeOfObjects+341
I tried to find memory leak but no memory leak found but it is a single page application so when page is renders at the time compiled code only increase shallow size.
The same project and same code build successfully by my colleague laptop.
"build": "react-scripts --max_old_space_size=4096 bild" in my laptop I used above command at package.json file build works correctly.
Now my dought is maybe my project have a any memory leak above the command will it work or not?
Above command will it work at gitlab or not?
Beta Was this translation helpful? Give feedback.
All reactions