From 168c5db1126185c8176f2b15f9ac972873c0e42b Mon Sep 17 00:00:00 2001 From: Sebastian-Webster <84299475+Sebastian-Webster@users.noreply.github.com> Date: Thu, 9 Oct 2025 12:48:34 +0400 Subject: [PATCH] add informative error message for visual c++ redistributable related error --- src/libraries/Executor.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/libraries/Executor.ts b/src/libraries/Executor.ts index 24dd4a6..3805ae2 100644 --- a/src/libraries/Executor.ts +++ b/src/libraries/Executor.ts @@ -194,7 +194,14 @@ class Executor { } if (code) { - const errorMessage = `The database exited early with code ${code}. The error log was:\n${errorLog}\nThe error string was: "${errorString}".` + let errorMessage: string = '' + + if (os.platform() === 'win32' && code === 3221225781) { + errorMessage = `The MySQL database exited early with code 3221225781. A possible cause is that the Microsoft Visual C++ Redistributable Package is not installed. Please refer to the following link for this package's requirements on your system - this may help solve this error: https://github.com/Sebastian-Webster/mysql-memory-server-nodejs/blob/v1.12.0/docs/SUPPORTED_MYSQL_DOWNLOADS.md#required-dependencies. If you are sure you have this installed, check the following for more details: The error log was:\n${errorLog}\nThe error string was: "${errorString}".` + } else { + errorMessage = `The database exited early with code ${code}. The error log was:\n${errorLog}\nThe error string was: "${errorString}".` + } + this.logger.error(errorMessage) return reject(errorMessage) }