-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option for Nodejs path like BUN_PATH
#3905
Comments
Here is the function we run when searching for def get_node_path() -> str | None:
"""Get the node binary path.
Returns:
The path to the node binary file.
"""
node_path = Path(constants.Node.PATH)
if not node_path.exists():
return str(which("node"))
return str(node_path) So if node is missing from the reflex data folder, it should try to find wherever you have it installed at the moment. |
Hmm... I checked and it seems to return a path that is OK
In my case, The data directory is
and hence the error. I'll do a bit more digging on this |
I think this function is the issue while deciding whether to install node or not: def check_node_version() -> bool:
"""Check the version of Node.js.
Returns:
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
else current_version == version.parse(constants.Node.VERSION)
)
return False I'm currently using node version The function above checks for total equality which causes the problem here, even the patch version update will return a False and will result in installing Node separately |
#3981 no longer solve this issue, but a follow up PR will. |
I also saw another mentioned PR which changed how the nodejs binary is checked, is reflex now supporting latest nodejs ? |
With PR #4006, we've added a CI check to run the integration test with latest node (22.9.0 at the time of writing this, but CI will always check the latest one.) You can either try the PR or wait for 0.6.1 which should include this fix.
|
Awesome. Thanks a lot |
Describe the bug
Reflex tries to install the required node version by itself into data directory but this fails on systems like NixOS or Guix because its not allowed to run binaries directly
To Reproduce
Expected behavior
Reflex runs without any errors just like in the documentation
Specifics (please complete the following information):
Additional context
Related issue: #1470
The text was updated successfully, but these errors were encountered: