reflex icon indicating copy to clipboard operation
reflex copied to clipboard

relfex init fail

Open EzequielQuintana opened this issue 7 months ago β€’ 9 comments

Describe the bug Falla cuando hago reflex init To Reproduce Steps to reproduce the behavior:

  • Code/Link to Repo:
─────────────────────────────────────────────────────────────────────────────────────── Initializing link_bio2 ───────────────────────────────────────────────────────────────────────────────────────
Traceback (most recent call last):
  File "/home/niko/Documentos/python/link_bio2/venv/bin/reflex", line 8, in <module>
    sys.exit(cli())
             ^^^^^
  File "/home/niko/Documentos/python/link_bio2/venv/lib/python3.11/site-packages/typer/main.py", line 328, in __call__
    raise e
  File "/home/niko/Documentos/python/link_bio2/venv/lib/python3.11/site-packages/typer/main.py", line 311, in __call__
    return get_command(self)(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/niko/Documentos/python/link_bio2/venv/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/niko/Documentos/python/link_bio2/venv/lib/python3.11/site-packages/typer/core.py", line 778, in main
    return _main(
           ^^^^^^
  File "/home/niko/Documentos/python/link_bio2/venv/lib/python3.11/site-packages/typer/core.py", line 216, in _main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/home/niko/Documentos/python/link_bio2/venv/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/niko/Documentos/python/link_bio2/venv/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/niko/Documentos/python/link_bio2/venv/lib/python3.11/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/niko/Documentos/python/link_bio2/venv/lib/python3.11/site-packages/typer/main.py", line 683, in wrapper
    return callback(**use_params)  # type: ignore
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/niko/Documentos/python/link_bio2/venv/lib/python3.11/site-packages/reflex/reflex.py", line 123, in init
    _init(name, template, loglevel)
  File "/home/niko/Documentos/python/link_bio2/venv/lib/python3.11/site-packages/reflex/reflex.py", line 94, in _init
    prerequisites.initialize_frontend_dependencies()
  File "/home/niko/Documentos/python/link_bio2/venv/lib/python3.11/site-packages/reflex/utils/prerequisites.py", line 834, in initialize_frontend_dependencies
    processes.run_concurrently(install_node, install_bun)
  File "/home/niko/Documentos/python/link_bio2/venv/lib/python3.11/site-packages/reflex/utils/processes.py", line 199, in run_concurrently
    with run_concurrently_context(*fns):
  File "/usr/lib/python3.11/contextlib.py", line 144, in __exit__
    next(self.gen)
  File "/home/niko/Documentos/python/link_bio2/venv/lib/python3.11/site-packages/reflex/utils/processes.py", line 186, in run_concurrently_context
    task.result()
  File "/usr/lib/python3.11/concurrent/futures/_base.py", line 449, in result
    return self.__get_result()
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
  File "/usr/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/niko/Documentos/python/link_bio2/venv/lib/python3.11/site-packages/reflex/utils/prerequisites.py", line 606, in install_bun
    if os.path.exists(get_config().bun_path) and get_bun_version() == version.parse(
                                                 ^^^^^^^^^^^^^^^^^
  File "/home/niko/Documentos/python/link_bio2/venv/lib/python3.11/site-packages/reflex/utils/prerequisites.py", line 107, in get_bun_version
    return version.parse(result.stdout)  # type: ignore
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/niko/Documentos/python/link_bio2/venv/lib/python3.11/site-packages/packaging/version.py", line 54, in parse
    return Version(version)
           ^^^^^^^^^^^^^^^^
  File "/home/niko/Documentos/python/link_bio2/venv/lib/python3.11/site-packages/packaging/version.py", line 200, in __init__
    raise InvalidVersion(f"Invalid version: '{version}'")
packaging.version.InvalidVersion: Invalid version: ''

Expected behavior que se ejecute correctamente

Screenshots If applicable, add screenshots to help explain your problem.

Specifics (please complete the following information):

  • Python Version: 3.11

  • Reflex Version: reflex 0.3.9 reflex-hosting-cli 0.1.6

  • OS: DISTRIB_ID=LinuxMint DISTRIB_RELEASE=20.3 DISTRIB_CODENAME=una DISTRIB_DESCRIPTION="Linux Mint 20.3 Una" NAME="Linux Mint" VERSION="20.3 (Una)" ID=linuxmint ID_LIKE=ubuntu PRETTY_NAME="Linux Mint 20.3" VERSION_ID="20.3" HOME_URL="https://www.linuxmint.com/" SUPPORT_URL="https://forums.linuxmint.com/" BUG_REPORT_URL="http://linuxmint-troubleshooting-guide.readthedocs.io/en/latest/" PRIVACY_POLICY_URL="https://www.linuxmint.com/" VERSION_CODENAME=una UBUNTU_CODENAME=focal

  • Browser (Optional):

Additional context Add any other context about the problem here.

EzequielQuintana avatar Jan 24 '24 23:01 EzequielQuintana

your logs are missing the system info aspect which shows before the initialization step. Should look something like this: ───────────────────────────────── System Info ──────────────────────────────────

can you re-run reflex init --loglevel debug and add that?

ElijahAhianyo avatar Jan 26 '24 17:01 ElijahAhianyo

If reflex init crashes before its able to output system info, can you post the bun version by running it directly?

~/.local/share/reflex/bun/bin/bun --version

masenf avatar Jan 26 '24 17:01 masenf

.local/share/reflex/bun/bin/bun --version InstrucciΓ³n ilegal (`core' generado)

El vie, 26 ene 2024 a las 14:36, Masen Furer @.***>) escribiΓ³:

If reflex init crashes before its able to output system info, can you post the bun version by running it directly?

.local/share/reflex/bun/bin/bun --version

β€” Reply to this email directly, view it on GitHub https://github.com/reflex-dev/reflex/issues/2449#issuecomment-1912431125, or unsubscribe https://github.com/notifications/unsubscribe-auth/A6P2MSWLTUT5QTOKWJIPZK3YQPSR5AVCNFSM6AAAAABCJTPPDCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJSGQZTCMJSGU . You are receiving this because you authored the thread.Message ID: @.***>

EzequielQuintana avatar Jan 26 '24 17:01 EzequielQuintana

@EzequielQuintana okay i think you're hitting https://github.com/oven-sh/bun/issues/67, which shows up on older machines.

To confirm this theory, download the "baseline" build of bun, and extract it to ~/.local/share/reflex/bun/bin/bun, then see if you can get the version.

https://github.com/oven-sh/bun/releases/download/bun-v1.0.25/bun-linux-x64-baseline.zip

Oh, and if you please, post the output of cat /proc/cpuinfo

masenf avatar Jan 26 '24 17:01 masenf

Same error

sudo .local/share/reflex/bun/bin/bun --version InstrucciΓ³n ilegal

El vie, 26 ene 2024 a las 14:59, Masen Furer @.***>) escribiΓ³:

@EzequielQuintana https://github.com/EzequielQuintana okay i think you're hitting oven-sh/bun#67 https://github.com/oven-sh/bun/issues/67, which shows up on older machines.

To confirm this theory, download the "baseline" build of bun, and extract it to ~/.local/share/reflex/bun/bin/bun, then see if you can get the version.

https://github.com/oven-sh/bun/releases/download/bun-v1.0.25/bun-linux-x64-baseline.zip

β€” Reply to this email directly, view it on GitHub https://github.com/reflex-dev/reflex/issues/2449#issuecomment-1912463016, or unsubscribe https://github.com/notifications/unsubscribe-auth/A6P2MST4OHDNVMIXUFRFOPTYQPVH5AVCNFSM6AAAAABCJTPPDCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJSGQ3DGMBRGY . You are receiving this because you were mentioned.Message ID: @.***>

EzequielQuintana avatar Jan 26 '24 18:01 EzequielQuintana

Same error message PS C:\Users\acer i3\my_app_name> reflex init reflex : The term 'reflex' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name,
or if a path was included, verify that the path is correct and try again.
At line:1 char:1

  • reflex init
  •   + CategoryInfo          : ObjectNotFound: (reflex:String) [], CommandNo  
     tFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    
    

iddrisumohamme1 avatar Feb 02 '24 04:02 iddrisumohamme1

@iddrisumohamme1 Are you using a virtual env as recommended in the docs?

picklelo avatar Feb 02 '24 20:02 picklelo

yes

iddrisumohamme1 avatar Feb 03 '24 03:02 iddrisumohamme1

Same error message PS C:\Users\acer i3\my_app_name> reflex init reflex : The term 'reflex' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1

  • reflex init
  •   + CategoryInfo          : ObjectNotFound: (reflex:String) [], CommandNo  
     tFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    
    

Can you confirm if this is still an issue?

ElijahAhianyo avatar Apr 04 '24 08:04 ElijahAhianyo