我目前正在使用 AWS EC2 t2.micro、Docker 部署 Node.js 服务器。
我使用构建了一个打字稿文件tsc并尝试直接运行构建的文件。
但是,在使用 tsc 命令时,会出现 javascript 堆内存不足错误。
<--- Last few GCs --->
lo[29:0x5f661f0] 18203 ms: Mark-sweep (reduce) 489.2 (491.1) -> 488.3 (492.4) MB, 709.8 / 0.0 ms (+ 0.1 ms in 16 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 728 ms) (average mu = 0.243, current mu = 0.025) allocati[29:0x5f661f0] 18935 ms: Mark-sweep (reduce) 489.4 (491.4) -> 488.8 (492.9) MB, 713.0 / 0.0 ms (+ …Run Code Online (Sandbox Code Playgroud)