please help me fix this error
this error occurs when i install the library in my expo project
yarn add react-native-easy-markdown
<--- Last few GCs --->
[46238:0x4dae7b0] 86837 ms: Scavenge 2038.6 (2078.8) -> 2038.0 (2079.6) MB, 5.7 / 0.0 ms (average mu = 0.261, current mu = 0.252) allocation failure
[46238:0x4dae7b0] 86847 ms: Scavenge 2039.3 (2079.6) -> 2038.7 (2084.1) MB, 5.2 / 0.0 ms (average mu = 0.261, current mu = 0.252) allocation failure
[46238:0x4dae7b0] 86866 ms: Scavenge 2041.9 (2084.1) -> 2040.4 (2084.6) MB, 5.4 / 0.0 ms (average mu = 0.261, current mu = 0.252) allocation failure
<--- JS stacktrace --->
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 0xb02960 node::Abort() [node]
2: 0xa18149 node::FatalError(char const*, char const*) [node]
2
Answers
it seems you don’t have enough resources on your computer [storage,RAM], check the Task manager while executing the installation command.
otherwise try to expand allowed memory allocated to nodejs runtime using this command:
export NODE_OPTIONS=--max-old-space-size=4096
yarn cache clean
node_modules
folder.lock
files likeyarn.lock
yarn