小编Oğu*_*mlu的帖子

在生产模式下 Dockerizing React:致命错误:接近堆限制的无效标记压缩分配失败 - JavaScript 堆内存不足

我正在尝试 dockerize 一个 React 应用程序。虽然我可以在开发模式下做到,但我不能在生产模式下做到。

我也可以在本地构建它,但是当我尝试 Docker 时出现此错误:

Step 10/14 : RUN npm run build
 ---> Running in 2c95d18e526c

> x@0.1.0 build /x
> react-scripts build

Creating an optimized production build...
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 0x8fb090 node::Abort() [node]
 2: 0x8fb0dc  [node]
 3: 0xb0322e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]

<--- Last few GCs --->

[25:0x4394f50]   192197 ms: Mark-sweep 1375.9 (1444.4) -> 1366.4 (1444.4) MB, 993.9 / 0.0 ms  (average …
Run Code Online (Sandbox Code Playgroud)

docker reactjs dockerfile

4
推荐指数
3
解决办法
6955
查看次数

TypeScript 中“扩展空对象”有什么意义?

class Document<T extends {}>{}和之间有什么区别class Document<T>{}

你能举出一些例子来说明差异吗?

typescript

3
推荐指数
1
解决办法
351
查看次数

标签 统计

docker ×1

dockerfile ×1

reactjs ×1

typescript ×1