mirror of
https://github.com/OpenHands/OpenHands.git
synced 2026-03-22 13:47:19 +08:00
chore: use pnpm to manage frontend deps (#659)
* chore: use pnpm to manage frontend deps * typo: change content of tips * docs: update node.js require version & replacement installation link * feat: detect the Node.js version to ensure corepack is supported * typo: remove chinese comment * fix: lint CI config, use pnpm to install dependencies * fix: nextui style error when using pnpm * fix: ci setup pnpm cwd * fix: frontend lint ci install deps crash * fix: ci lint frontend missing package.json path * fix: frontend lint ci add cache-dependency-path prop
This commit is contained in:
9
Makefile
9
Makefile
@@ -18,7 +18,14 @@ build:
|
||||
@python -m pip install pipenv
|
||||
@python -m pipenv install -v
|
||||
@echo "Setting up frontend environment..."
|
||||
@cd frontend && npm install
|
||||
@echo "Detect Node.js version..."
|
||||
@cd frontend && node ./scripts/detect-node-version.js
|
||||
@cd frontend && if [ -f node_modules/.package-lock.json ]; then \
|
||||
echo "This project currently uses "pnpm" for dependency management. It has detected that dependencies were previously installed using "npm" and has automatically deleted the "node_modules" directory to prevent unnecessary conflicts."; \
|
||||
rm -rf node_modules; \
|
||||
fi
|
||||
@which corepack > /dev/null || (echo "Installing corepack..." && npm install -g corepack)
|
||||
@cd frontend && corepack enable && pnpm install
|
||||
|
||||
# Start backend
|
||||
start-backend:
|
||||
|
||||
Reference in New Issue
Block a user