Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

reflex run --frontend-only / --backend-only fails when rxconfig sets the ports

Aperta Adatta ai principianti
#7,686 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

@ybai08 ci sta già lavorando.

Dal 29/10/2026.

  • #7693 di @ybai08 — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
82/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
backend, cli

Direzione di ricerca

La issue rimanda a run() e _run() in reflex/reflex.py; leggi come vengono applicate le porte di configurazione e come le modalità a lato singolo convalidano le porte. Controlla i test esistenti per reflex run --frontend-only e --backend-only, poi aggiungi test per le porte configurate e le opzioni esplicite delle porte. Il lavoro è completo quando le porte configurate non bloccano più le esecuzioni a lato singolo, mentre un’opzione esplicita per il lato non in esecuzione continua a generare un errore.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Problem

reflex run --frontend-only and reflex run --backend-only exit at once when rxconfig.py sets frontend_port or backend_port.

Repro
# rxconfig.py
import reflex as rx

config = rx.Config(app_name="app", frontend_port=3653, backend_port=8653)
$ reflex run --env prod --frontend-only
Cannot specify --backend-port when not running backend.
$ reflex run --env prod --backend-only
Cannot specify --frontend-port when not running frontend.

The same happens in dev. No port flag is given on the command line.

Cause

run() in reflex/reflex.py fills both ports from the config before it calls _run():

frontend_port = frontend_port or config.frontend_port
backend_port = backend_port or config.backend_port

_run() then rejects a port for the side that does not run. It cannot tell a port from the config from a --frontend-port / --backend-port flag.

Expected

A port from the config does not block a single-side run. Only an explicit flag for the side that does not run is an error. Moving the config fallback below the running-mode check would do this.

Workaround

Remove the ports from rxconfig.py and pass --frontend-port or --backend-port to each run.

Lingua principale
Python
Stelle
29k
Fork
1.8k
Merge medio
3g 11h
PR unite (30g)
173

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di reflex-dev/reflex

Tutte le issue di reflex-dev/reflex

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.