Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

fix: get node version edge case (#4590)

Akshay Agrawal3a2cc3bc0af3
diff --git a/marimo/_utils/health.py b/marimo/_utils/health.py
index 5bb3022c55..d4fc20271a 100644
--- a/marimo/_utils/health.py
+++ b/marimo/_utils/health.py
@@ -22,7 +22,10 @@ def get_node_version() -> Optional[str]:
stdout, stderr = process.communicate()
if stderr:
return None
- return stdout.strip().split()[-1]
+ if stdout and (stripped := stdout.strip()):
+ return stripped.split()[-1]
+ else:
+ return None
except FileNotFoundError:
return None