Cloudflare Website Build Segfault

I am building a docusaurus website on Cloudflare pages.
The local build finishes without any error, but I have the following problem.

|19:21:20.217|ℹ Compiling Client|
|---|---|
|19:21:20.239|ℹ Compiling Server|
|19:23:29.930|✔ Client: Compiled successfully in 2.16m|
|19:25:04.385|✔ Server: Compiled successfully in 3.74m|
|19:25:44.692|Segmentation fault|
|19:25:44.724|Failed: build command exited with code: 139|
|19:25:45.742|Failed: an internal error occurred|

Any suggestions?