-
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
Volta Error: volta-shim Invoked Directly by Reflex on reflex run #4376
Comments
The bug still exists
|
Hey, I am stuck with the exact same issues on macOS. Just tried to run
Any clue?
|
What is the output of |
Thanks for trying to help! :) Actually, it's |
Got it, the problem comes from the function Change if npm_path is not None:
return str(Path(npm_path).resolve()) to if npm_path is not None:
return npm_path |
the code @iCarossio said is here /venv/lib/python3.10/site-packages/reflex/utils/prerequisites.py:231:def get_package_manager(on_failure_return_none: bool = False) -> str | None: and it worked out for me. thx |
Describe the bug
When running reflex run, Reflex automatically attempts to use volta-shim to start the frontend, which results in an error. Volta's volta-shim should not be called directly, as Volta expects commands to be executed via the standard node or yarn commands instead. This prevents the frontend from starting successfully.
To Reproduce
Steps to reproduce the behavior:
Set up a new Reflex project on macOS with pipenv.
During reflex init, choose the blank template.
Run the command reflex run --loglevel debug
Expected behavior
Reflex should use Volta's node or yarn executables directly to start the frontend, avoiding volta-shim. The project should start without errors.
Specifics (please complete the following information):
Python Version: 3.9.6
Reflex Version: 0.6.5
OS: macOS 15.1
Additional context
pipenv Version: 2024.4.0
Volta Version: 2.0.1
Reflex is installed in a virtual environment via pipenv.
Reflex’s configuration appears to default to using volta-shim instead of node or yarn, causing the error below during reflex run --loglevel debug.
Log
────────────────────────────────────────────────────────────────────────────────────── System Info ───────────────────────────────────────────────────────────────────────────────────────
Debug: Config file: '/Users/username/.local/share/virtualenvs/proj-XXXXXX/lib/python3.9/site-packages/reflex/config.py'
Debug: Config: app_name='proj' loglevel=<LogLevel.DEFAULT: 'default'> frontend_port=3000 frontend_path='' backend_port=8000 api_url='http://localhost:8000'
deploy_url='http://localhost:3000' backend_host='0.0.0.0' db_url='sqlite:///reflex.db' redis_url=None telemetry_enabled=True bun_path=PosixPath('/Users/username/Library/Application
Support/reflex/bun/bin/bun') static_page_generation_timeout=60 cors_allowed_origins=['*'] tailwind={'plugins': ['@tailwindcss/typography']} timeout=120 next_compression=True
react_strict_mode=True frontend_packages=[] cp_backend_url='https://rxcp-prod-control-plane.fly.dev' cp_web_url='https://control-plane.reflex.run'
gunicorn_worker_class='uvicorn.workers.UvicornH11Worker' gunicorn_workers=None gunicorn_max_requests=100 gunicorn_max_requests_jitter=25 state_manager_mode=<StateManagerMode.DISK:
'disk'> redis_lock_expiration=10000 redis_token_expiration=3600 env_file=None
Debug: Running command: ['/Users/username/.volta/bin/node', '-v']
Debug: Running command: [PosixPath('/Users/username/Library/Application Support/reflex/fnm/fnm'), '--version']
Debug: Running command: ['/Users/username/Library/Application Support/reflex/bun/bin/bun', '-v']
Debug: [Reflex 0.6.5 with Python 3.9.6 (PATH: /Users/username/.local/share/virtualenvs/proj-XXXXXX/bin/python)]
Debug: [Node 22.11.0 (Expected: 22.11.0) (PATH:/Users/username/.volta/bin/node)]
Debug: [FNM None (Expected: 1.35.1) (PATH: /Users/username/Library/Application Support/reflex/fnm/fnm)]
Debug: [Bun 1.1.29 (Expected: 1.1.29) (PATH: /Users/username/Library/Application Support/reflex/bun/bin/bun)]
Debug: [OS Darwin Darwin Kernel Version 24.1.0: Thu Oct 10 21:02:45 PDT 2024; root:xnu-11215.41.3~2/RELEASE_ARM64_T8112]
Debug: Using package installer at: /Users/username/Library/Application Support/reflex/bun/bin/bun
Debug: Using package executer at: /opt/homebrew/Cellar/volta/2.0.1/bin/volta-shim
Debug: Unzip path: /usr/bin/unzip
────────────────────────────────────────────────────────────────────────────────── Starting Reflex App ───────────────────────────────────────────────────────────────────────────────────
/Users/username/.local/share/virtualenvs/proj-XXXXXX/lib/python3.9/site-packages/urllib3/init.py:35: NotOpenSSLWarning:
urllib3 v2 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: urllib3/urllib3#3020
[11:58:15] Compiling: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 13/13 0:00:00
Debug: Running command: ['/opt/homebrew/Cellar/volta/2.0.1/bin/volta-shim', 'run', 'next', 'telemetry', 'disable']
Debug: Running command: ['/Users/username/.volta/bin/node', '-v']
INFO: Will watch for changes in these directories: ['/Users/username/Desktop/proj/proj']
INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
INFO: Started reloader process [10528] using StatReload
────────────────────────────────────────────────────────────────────────────────────── App Running ───────────────────────────────────────────────────────────────────────────────────────
Debug: Running command: ['/opt/homebrew/Cellar/volta/2.0.1/bin/volta-shim', 'run', 'dev']
Debug: Starting frontend
Debug: Volta error: 'volta-shim' should not be called directly.
Debug:
Debug: Please use the existing shims provided by Volta (node, yarn, etc.) to run tools.
Starting frontend failed with exit code 126
Volta error: 'volta-shim' should not be called directly.
Please use the existing shims provided by Volta (node, yarn, etc.) to run tools.
Run with --loglevel debug for the full log.
/Users/username/.local/share/virtualenvs/proj-XXXXXX/lib/python3.9/site-packages/urllib3/init.py:35: NotOpenSSLWarning:
urllib3 v2 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: urllib3/urllib3#3020
INFO: Started server process [10579]
INFO: Waiting for application startup.
INFO: Application startup complete.
The text was updated successfully, but these errors were encountered: