Skip to content

Commit

Permalink
use larger or equal for node version check (#4189)
Browse files Browse the repository at this point in the history
  • Loading branch information
adhami3310 authored and simon committed Oct 23, 2024
1 parent 548978a commit 0d16f22
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions reflex/utils/prerequisites.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,9 @@ def check_node_version() -> bool:
Whether the version of Node.js is valid.
"""
current_version = get_node_version()
if current_version:
# Compare the version numbers
return (
current_version >= version.parse(constants.Node.MIN_VERSION)
if constants.IS_WINDOWS or path_ops.use_system_node()
else current_version == version.parse(constants.Node.VERSION)
)
return False
return current_version is not None and current_version >= version.parse(
constants.Node.MIN_VERSION
)


def get_node_version() -> version.Version | None:
Expand Down

0 comments on commit 0d16f22

Please sign in to comment.