Commit ca440057 by mvginghina

Robust dependency installation with node_modules removal and legacy peer deps

parent 6edb7f7f
Showing with 9 additions and 5 deletions
......@@ -4,19 +4,23 @@ set -e
# 1. Navighează la directorul cu codul sursă
cd "/home/site/wwwroot"
# 2. Clear npm cache (agresiv)
# 2. Clear npm cache (aggressively)
echo "Clearing npm cache (aggressively)..."
rm -rf /home/.npm
npm cache clean --force
# 3. Instalează dependențele
# 3. Remove node_modules directory
echo "Removing node_modules directory..."
rm -rf node_modules
# 4. Instalează dependențele
echo "Installing dependencies..."
npm install --force
npm install --force --legacy-peer-deps
# 4. Construiește aplicația Next.js
# 5. Construiește aplicația Next.js
echo "Building Next.js application..."
npm run build
# 5. Pornește aplicația Next.js
# 6. Pornește aplicația Next.js
echo "Starting Next.js application..."
npm start
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment