diff --git a/README.md b/README.md index 9ec7e31..6f903de 100644 --- a/README.md +++ b/README.md @@ -73,19 +73,28 @@ OPENAI_API_KEY="sk-..." ARRAYLAKE_API_KEY="your-arraylake-key" ``` -### 4. Start the FastAPI backend +### 4. Install frontend dependencies ```bash -uvicorn api.main:app --host 0.0.0.0 --port 8000 --reload +cd frontend +npm install +cd .. +``` + +> **Important:** Run `npm install` *before* starting the backend. If uvicorn is already running with `--reload`, the creation of `node_modules/` triggers a server restart, causing temporary `ETIMEDOUT` proxy errors in the frontend. + +### 5. Start the FastAPI backend + +```bash +uvicorn api.main:app --host 0.0.0.0 --port 8000 --reload --reload-exclude 'frontend/node_modules/*' ``` The API runs on `http://localhost:8000`. Health check: `GET /health`. -### 5. Start the React frontend +### 6. Start the React frontend ```bash cd frontend -npm install npm run dev ``` diff --git a/environment.yml b/environment.yml index 63df334..1cb664a 100644 --- a/environment.yml +++ b/environment.yml @@ -69,7 +69,6 @@ dependencies: # pip-only packages (not available on conda-forge) - pip: - - langchain-classic - - langchain-anthropic + - langchain-anthropic<1.0.0 - arraylake - aitta-client diff --git a/src/climsight/tools/destine_retrieval_tool.py b/src/climsight/tools/destine_retrieval_tool.py index 8523538..5a7cf7d 100644 --- a/src/climsight/tools/destine_retrieval_tool.py +++ b/src/climsight/tools/destine_retrieval_tool.py @@ -29,7 +29,7 @@ try: import streamlit as st -except ImportError: +except Exception: st = None logger = logging.getLogger(__name__) diff --git a/src/climsight/tools/era5_retrieval_tool.py b/src/climsight/tools/era5_retrieval_tool.py index 5261804..0ad6d24 100644 --- a/src/climsight/tools/era5_retrieval_tool.py +++ b/src/climsight/tools/era5_retrieval_tool.py @@ -25,7 +25,7 @@ # Optional: Check for Streamlit to support session state if available try: import streamlit as st - except ImportError: + except Exception: st = None except ImportError as e: install_command = "pip install --upgrade xarray zarr arraylake pandas numpy pydantic langchain-core"