Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/py/reactpy/reactpy/backend/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from typing import Any, NoReturn

from reactpy.backend.types import BackendImplementation
from reactpy.backend.utils import all_implementations
from reactpy.backend.utils import SUPPORTED_PACKAGES, all_implementations
from reactpy.types import RootComponentConstructor

logger = getLogger(__name__)
Expand Down Expand Up @@ -59,7 +59,13 @@ def _default_implementation() -> BackendImplementation[Any]:
implementation = next(all_implementations())
except StopIteration: # nocov
logger.debug("Backend implementation import failed", exc_info=exc_info())
msg = "No built-in server implementation installed."
supported_backends = ", ".join(SUPPORTED_PACKAGES)
msg = (
"It seems you haven't installed a backend. To resolve this issue, "
"you can install a backend by running:\n\n"
'\033[1mpip install "reactpy[starlette]"\033[0m\n\n'
f"Other supported backends include: {supported_backends}."
)
raise RuntimeError(msg) from None
else:
_DEFAULT_IMPLEMENTATION = implementation
Expand Down