Fail to build amcharts 4 using laravel-mix

Posted 2 months ago by joaorbrandao


I'm trying to import Amcharts 4 into my project but i got the following problem in my terminal.

I followed the installation that is in the amcharts.

This happens after I downgrade the webpack version to the 4.28.4.

Does anyone know how to overcome this?


> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js

 98% after emitting SizeLimitsPlugin

 DONE  Compiled successfully in 38339ms                                                                                                                                                                                                                          14:52:56

<--- Last few GCs --->

[21132:000002112E1CA5C0]    42336 ms: Mark-sweep 963.3 (1130.2) -> 963.3 (1119.2) MB, 179.2 / 0.0 ms  allocation failure GC in old space requested
[21132:000002112E1CA5C0]    42513 ms: Mark-sweep 963.3 (1119.2) -> 963.3 (1062.2) MB, 177.3 / 0.0 ms  last resort GC in old space requested
[21132:000002112E1CA5C0]    42686 ms: Mark-sweep 963.3 (1062.2) -> 963.3 (1042.7) MB, 173.6 / 0.0 ms  last resort GC in old space requested

<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 0000012CA5625879 <JSObject>
    1: stringToBytes [C:\xampp\htdocs\bcore\node_modules\charenc\charenc.js:~18] [pc=0000038EAF17BA4C](this=00000111E4D5A0F9 <Object map = 00000298112C3969>,str=00000044E6113F49 <Very long string[43825811]>)
    2: stringToBytes [C:\xampp\htdocs\bcore\node_modules\charenc\charenc.js:6] [bytecode=0000026E47B6E759 offset=39](this=00000111E4D5A0D1 <Object map = 00000298112C3969>,str=000002110B802...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
 1: node_module_register
 2: v8::internal::FatalProcessOutOfMemory
 3: v8::internal::FatalProcessOutOfMemory
 4: v8::internal::Factory::NewUninitializedFixedArray
 5: v8::internal::WasmDebugInfo::SetupForTesting
 6: v8::internal::interpreter::BytecodeArrayRandomIterator::UpdateOffsetFromIndex
 7: 0000038EAEE043C1
npm ERR! errno 3
npm ERR! @ dev: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
npm ERR! Exit status 3
npm ERR!
npm ERR! Failed at the @ dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\lsr1brg\AppData\Roaming\npm-cache\_logs19-05-14T13_52_59_542Z-debug.log

Please sign in or create an account to participate in this conversation.