From 981f46c4064b8e8b86ee7f45da73186a35db0546 Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Tue, 7 Oct 2025 14:19:34 +0200 Subject: [PATCH] fix(deployment): add warning for NIXPACKS_NODE_VERSION in node configurations - Implemented a check for the NIXPACKS_NODE_VERSION variable in the ApplicationDeploymentJob. - Added log entries to notify users when NIXPACKS_NODE_VERSION is not set, indicating that Node.js 18 will be used by default, which is EOL. - Provided guidance on how to override the default version by setting NIXPACKS_NODE_VERSION in environment variables. --- app/Jobs/ApplicationDeploymentJob.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/Jobs/ApplicationDeploymentJob.php b/app/Jobs/ApplicationDeploymentJob.php index fafcdb618..dfc91e9a9 100644 --- a/app/Jobs/ApplicationDeploymentJob.php +++ b/app/Jobs/ApplicationDeploymentJob.php @@ -1988,6 +1988,16 @@ private function generate_nixpacks_confs() if ($this->nixpacks_type === 'elixir') { $this->elixir_finetunes(); } + if ($this->nixpacks_type === 'node') { + // Check if NIXPACKS_NODE_VERSION is set + $variables = data_get($parsed, 'variables', []); + if (! isset($variables['NIXPACKS_NODE_VERSION'])) { + $this->application_deployment_queue->addLogEntry('----------------------------------------'); + $this->application_deployment_queue->addLogEntry('⚠️ NIXPACKS_NODE_VERSION not set. Nixpacks will use Node.js 18 by default, which is EOL.'); + $this->application_deployment_queue->addLogEntry('You can override this by setting NIXPACKS_NODE_VERSION=22 in your environment variables.'); + $this->application_deployment_queue->addLogEntry('----------------------------------------'); + } + } $this->nixpacks_plan = json_encode($parsed, JSON_PRETTY_PRINT); $this->nixpacks_plan_json = collect($parsed); $this->application_deployment_queue->addLogEntry("Final Nixpacks plan: {$this->nixpacks_plan}", hidden: true);