Skip to content

Commit 4da8305

Browse files
committed
Better Error message if no backend installed reactive-python#1042
1 parent f559e23 commit 4da8305

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: src/py/reactpy/reactpy/backend/default.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from typing import Any, NoReturn
77

88
from reactpy.backend.types import BackendImplementation
9+
from reactpy.backend.utils import SUPPORTED_PACKAGES
910
from reactpy.backend.utils import all_implementations
1011
from reactpy.types import RootComponentConstructor
1112

@@ -59,7 +60,10 @@ def _default_implementation() -> BackendImplementation[Any]:
5960
implementation = next(all_implementations())
6061
except StopIteration: # nocov
6162
logger.debug("Backend implementation import failed", exc_info=exc_info())
62-
msg = "No built-in server implementation installed."
63+
supported_backends = ', '.join(SUPPORTED_PACKAGES)
64+
msg = "It seems you haven't installed any built-in backends. \n" \
65+
"To resolve this issue, you can install a backend like 'reactpy[starlette]' or any other supported backend.\n" \
66+
f"The list of supported backends is: {supported_backends}."
6367
raise RuntimeError(msg) from None
6468
else:
6569
_DEFAULT_IMPLEMENTATION = implementation

0 commit comments

Comments
 (0)