diff --git a/app/Http/Controllers/SetupController.php b/app/Http/Controllers/SetupController.php index 84f3fdd6325d..a174e7e07b28 100644 --- a/app/Http/Controllers/SetupController.php +++ b/app/Http/Controllers/SetupController.php @@ -205,4 +205,6 @@ class SetupController extends Controller return response([], 500); } } + + } diff --git a/app/Utils/SystemHealth.php b/app/Utils/SystemHealth.php index 09ae9451aa68..864b88dca942 100644 --- a/app/Utils/SystemHealth.php +++ b/app/Utils/SystemHealth.php @@ -71,9 +71,43 @@ class SystemHealth 'env_writable' => self::checkEnvWritable(), //'mail' => self::testMailServer(), 'simple_db_check' => (bool) self::simpleDbCheck(), + 'npm_status' => self::checkNpm(), + 'node_status' => self::checkNode(), ]; } + public static function checkNode() + { + try { + exec('node -v', $foo, $exitCode); + + if ($exitCode === 0) { + return $exitCode; + } + + } catch (\Exception $e) { + + return false; + } + + } + + public static function checkNpm() + { + try { + exec('npm -v', $foo, $exitCode); + + if ($exitCode === 0) { + return $exitCode; + } + + }catch (\Exception $e) { + + return false; + } + + } + private static function simpleDbCheck() :bool { $result = true; diff --git a/resources/views/setup/_issues.blade.php b/resources/views/setup/_issues.blade.php index 7baf3165456e..33f6b9d36bcb 100644 --- a/resources/views/setup/_issues.blade.php +++ b/resources/views/setup/_issues.blade.php @@ -61,6 +61,42 @@ @endif +