Skip to content

Commit

Permalink
refactor: Enhance frontend build process with detailed logging and er…
Browse files Browse the repository at this point in the history
…ror handling (#5473)
  • Loading branch information
ogabrielluiz authored Dec 27, 2024
1 parent 3712699 commit 039f80c
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,17 @@ install_frontend: ## install the frontend dependencies
@cd src/frontend && npm install > /dev/null 2>&1

build_frontend: ## build the frontend static files
@echo 'Building frontend static files'
@cd src/frontend && CI='' npm run build
@echo '==== Starting frontend build ===='
@echo 'Current directory: $$(pwd)'
@echo 'Checking if src/frontend exists...'
@ls -la src/frontend || true
@echo 'Building frontend static files...'
@cd src/frontend && CI='' npm run build 2>&1 || { echo "\nBuild failed! Error output above ☝️"; exit 1; }
@echo 'Clearing destination directory...'
$(call CLEAR_DIRS,src/backend/base/langflow/frontend)
@echo 'Copying build files...'
@cp -r src/frontend/build/. src/backend/base/langflow/frontend
@echo '==== Frontend build complete ===='

init: check_tools clean_python_cache clean_npm_cache ## initialize the project
@make install_backend
Expand Down

0 comments on commit 039f80c

Please sign in to comment.