Skip to content

Commit

Permalink
fix: Add "npm install -g pnpm" if pnpm isn't installed (#2472)
Browse files Browse the repository at this point in the history
Co-authored-by: Joongi Kim <[email protected]>
  • Loading branch information
ggstargame45 and achimnol authored Jul 17, 2024
1 parent 85912ef commit 72a62a6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions changes/2472.fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update the install-dev scripts to install `pnpm` if pnpm isn't installed.
4 changes: 4 additions & 0 deletions scripts/install-dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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..."
Expand Down
4 changes: 4 additions & 0 deletions src/ai/backend/install/dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -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..."
Expand Down

0 comments on commit 72a62a6

Please sign in to comment.