From 72a62a6355386f4a42eee9e453081e4814d2dd0e Mon Sep 17 00:00:00 2001 From: HYUNMIN CHO <48516380+ggstargame45@users.noreply.github.com> Date: Wed, 17 Jul 2024 16:22:26 +0900 Subject: [PATCH] fix: Add "npm install -g pnpm" if pnpm isn't installed (#2472) Co-authored-by: Joongi Kim --- changes/2472.fix.md | 1 + scripts/install-dev.sh | 4 ++++ src/ai/backend/install/dev.py | 4 ++++ 3 files changed, 9 insertions(+) create mode 100644 changes/2472.fix.md diff --git a/changes/2472.fix.md b/changes/2472.fix.md new file mode 100644 index 0000000000..d71dcaf0e3 --- /dev/null +++ b/changes/2472.fix.md @@ -0,0 +1 @@ +Update the install-dev scripts to install `pnpm` if pnpm isn't installed. \ No newline at end of file diff --git a/scripts/install-dev.sh b/scripts/install-dev.sh index 6c3067bc94..185be9126e 100755 --- a/scripts/install-dev.sh +++ b/scripts/install-dev.sh @@ -595,6 +595,10 @@ install_editable_webui() { if ! command -v node &> /dev/null; then install_node fi + if ! command -v pnpm &> /dev/null; then + show_info "Installing pnpm..." + npm install -g pnpm + fi show_info "Installing editable version of Web UI..." if [ -d "./src/ai/backend/webui" ]; then echo "src/ai/backend/webui already exists, so running 'make clean' on it..." diff --git a/src/ai/backend/install/dev.py b/src/ai/backend/install/dev.py index 32189f3a28..7336c0fe8c 100644 --- a/src/ai/backend/install/dev.py +++ b/src/ai/backend/install/dev.py @@ -82,6 +82,10 @@ async def install_editable_webui(ctx: Context) -> None: if ! command -v node &> /dev/null; then install_node fi + if ! command -v pnpm &> /dev/null; then + show_info "Installing pnpm..." + npm install -g pnpm + fi show_info "Installing editable version of Web UI..." if [ -d "./src/ai/backend/webui" ]; then echo "src/ai/backend/webui already exists, so running 'make clean' on it..."