File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed
packages/cli-v3/src/workers/common Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,8 @@ export class GracefulExitTimeoutError extends Error {
69
69
export function getFriendlyErrorMessage (
70
70
code : number ,
71
71
signal : NodeJS . Signals | null ,
72
- stderr : string | undefined
72
+ stderr : string | undefined ,
73
+ dockerMode = true
73
74
) {
74
75
const message = ( text : string ) => {
75
76
if ( signal ) {
@@ -79,7 +80,20 @@ export function getFriendlyErrorMessage(
79
80
}
80
81
} ;
81
82
82
- if ( code === 137 || stderr ?. includes ( "OOMErrorHandler" ) ) {
83
+ if ( code === 137 ) {
84
+ if ( dockerMode ) {
85
+ return message (
86
+ "Process ran out of memory! Try choosing a machine preset with more memory for this task."
87
+ ) ;
88
+ } else {
89
+ // Note: containerState reason and message should be checked to clarify the error
90
+ return message (
91
+ "Process most likely ran out of memory, but we can't be certain. Try choosing a machine preset with more memory for this task."
92
+ ) ;
93
+ }
94
+ }
95
+
96
+ if ( stderr ?. includes ( "OOMErrorHandler" ) ) {
83
97
return message (
84
98
"Process ran out of memory! Try choosing a machine preset with more memory for this task."
85
99
) ;
You can’t perform that action at this time.
0 commit comments