reflex icon indicating copy to clipboard operation
reflex copied to clipboard

Node Version Not Controllable From CLI

Open cm107 opened this issue 3 years ago β€’ 1 comments

Describe the bug When I try to use reflex on an older version of Ubuntu (e.g. Ubuntu 18.04.6 LTS), I encounter the following error when trying to run the reflex app.

packaging.version.InvalidVersion: Invalid version: '/home/clayton/.local/share/reflex/fnm/node-versions/v18.17.0/installation/bin/node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by /home/clayton/.local/share/reflex/fnm/node-versions/v18.17.0/installation/bin/node)

I know from experience that I can't use node v18 because my GLIBC is old.

clayton@asus:~$ ldd --version
ldd (Ubuntu GLIBC 2.27-3ubuntu1.6) 2.27
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

I know that I need to use node v16 because v16 works with GLIBC2.27, but I don't see anyway to control the node version using the reflex CLI. In particular, this should be an option for reflex init, e.g. reflex init --node_version 16.20.1.

In the end, I had to modify reflex/constants/installer.py directly in order to change the default node version. Only then was I able to get around the error.

To Reproduce On an older version of ubuntu, like Ubuntu 18.04.6 LTS, install reflex and try to initialize an app. You won't be able to see the error unless you use --loglevel debug.

pip install reflex
mkdir chatapp
cd chatapp
reflex init --loglevel debug

Expected behavior There needs to be a way to specify the node version other than overwriting the constants in the source code.

Specifics (please complete the following information):

  • Python Version: 3.10.6
  • Reflex Version: 0.2.8
  • OS: Ubuntu 18.04.6 LTS
  • Browser (Optional): N/A

cm107 avatar Oct 10 '23 09:10 cm107

Reflex should now handle node under the hood and not require the user to manage it.

picklelo avatar Jun 03 '24 03:06 picklelo