kripken / box2d.js

Port of Box2D to JavaScript using Emscripten
1.32k stars 196 forks source link

Import error in node.js #82

Open leaf-node opened 7 years ago

leaf-node commented 7 years ago

I get the following error when trying to import into node the latest file in your build/ directory. After entering the first command, a long time passes before the first error is displayed.

$ node
> box = require('./Box2D_v2.3.1_min.js');

<--- Last few GCs --->

   27079 ms: Scavenge 1401.8 (1451.0) -> 1401.8 (1451.0) MB, 9.1 / 0 ms (+ 8.5 ms in 1 steps since last GC) [allocation failure] [incremental marking delaying mark-sweep].
   27845 ms: Mark-sweep 1401.8 (1451.0) -> 1401.8 (1450.0) MB, 766.5 / 0 ms (+ 405.2 ms in 2817 steps since start of marking, biggest step 8.5 ms) [last resort gc].
   28566 ms: Mark-sweep 1401.8 (1450.0) -> 1401.8 (1451.0) MB, 720.9 / 0 ms [last resort gc].

<--- JS stacktrace --->

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

Security context: 0x1c7dd7bb4629 <JS Object>
    2: formatProperty(aka formatProperty) [util.js:~592] [pc=0x1511250d47ba] (this=0x1c7dd7b041b9 <undefined>,ctx=0x1c7dd7baf811 <an Object with map 0x3ec87b17b631>,value=0x31ef2883ab9 <an Int8Array with map 0x3ec87b12c8a1>,recurseTimes=1,visibleKeys=0x1c7dd7baf781 <an Object with map 0xb60caa08829>,key=0x2d3e3c0a2c41 <String[7]: 1398968>,array=0x1c7dd7b04251 <false>)
    3: /* anonymous */(aka...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory
Aborted (core dumped)