Installers: Force clean npm install to apply React overrides (bug fix)
This commit is contained in:
@@ -144,9 +144,16 @@ else
|
|||||||
git clone "$REPO_URL" "$TARGET_DIR"
|
git clone "$REPO_URL" "$TARGET_DIR"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Step 4: Install dependencies
|
# Step 4: Install dependencies (clean install to ensure React overrides work)
|
||||||
cd "$TARGET_DIR"
|
cd "$TARGET_DIR"
|
||||||
echo -e "${CYAN}[4/4] Installing dependencies...${NC}"
|
echo -e "${CYAN}[4/4] Installing dependencies...${NC}"
|
||||||
|
|
||||||
|
# Clean existing node_modules to ensure React overrides take effect
|
||||||
|
if [ -d "node_modules" ]; then
|
||||||
|
echo -e "${YELLOW}[*] Cleaning existing dependencies for fresh install...${NC}"
|
||||||
|
rm -rf node_modules package-lock.json
|
||||||
|
fi
|
||||||
|
|
||||||
npm install --legacy-peer-deps
|
npm install --legacy-peer-deps
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo -e "${YELLOW}[!] Retrying npm install...${NC}"
|
echo -e "${YELLOW}[!] Retrying npm install...${NC}"
|
||||||
|
|||||||
Reference in New Issue
Block a user