diff --git a/lib/modules/manager/npm/post-update/yarn.ts b/lib/modules/manager/npm/post-update/yarn.ts index f46075e1257b500a21da1755c06b9f4f9faac226..4b7b269ee06e1591f5c4efc8d924f38adfa8614f 100644 --- a/lib/modules/manager/npm/post-update/yarn.ts +++ b/lib/modules/manager/npm/post-update/yarn.ts @@ -281,17 +281,19 @@ export async function generateLockFile( }, 'lock file error' ); - if (err.stderr) { - if (err.stderr.includes('ENOSPC: no space left on device')) { - throw new Error(SYSTEM_INSUFFICIENT_DISK_SPACE); - } - if ( - err.stderr.includes('The registry may be down.') || - err.stderr.includes('getaddrinfo ENOTFOUND registry.yarnpkg.com') || - err.stderr.includes('getaddrinfo ENOTFOUND registry.npmjs.org') - ) { - throw new ExternalHostError(err, NpmDatasource.id); - } + const stdouterr = String(err.stdout) + String(err.stderr); + if ( + stdouterr.includes('ENOSPC: no space left on device') || + stdouterr.includes('Out of diskspace') + ) { + throw new Error(SYSTEM_INSUFFICIENT_DISK_SPACE); + } + if ( + stdouterr.includes('The registry may be down.') || + stdouterr.includes('getaddrinfo ENOTFOUND registry.yarnpkg.com') || + stdouterr.includes('getaddrinfo ENOTFOUND registry.npmjs.org') + ) { + throw new ExternalHostError(err, NpmDatasource.id); } return { error: true, stderr: err.stderr, stdout: err.stdout }; }