Skip to content

Latest commit

 

History

History
105 lines (77 loc) · 1.96 KB

File metadata and controls

105 lines (77 loc) · 1.96 KB

🚨 NETLIFY DEPLOYMENT - SZYBKA NAPRAWA

Problem: @netlify/plugin-essential-next-js plugin error Rozwiązanie: 30 sekund ⏰


✅ SZYBKA NAPRAWA (SKOPIUJ I WKLEJ):

# Automatyczna naprawa
chmod +x fix-netlify.sh
./fix-netlify.sh

# LUB ręcznie:
git add netlify.toml
git commit -m "🔧 Fix Netlify deployment"
git push origin main

🎯 CO ZOSTAŁO NAPRAWIONE:

Problem byl w netlify.toml:

# ❌ ŹLAY - Next.js plugin w React aplikacji
[[plugins]]
  package = "@netlify/plugin-essential-next-js"

Naprawione - usunięty plugin:

# ✅ DOBRE - brak niepotrzebnych pluginów
[build]
  command = "npm ci --legacy-peer-deps && npm run build"
  publish = "dist"

🚀 NETLIFY DEPLOY - NOWE USTAWIENIA:

Po push na GitHub, Netlify automatycznie:

  1. Build command: npm ci --legacy-peer-deps && npm run build
  2. Publish directory: dist
  3. Node.js version: 18
  4. Memory: 4GB (NODE_OPTIONS)

📋 NASTĘPNE KROKI:

  1. Push zmiany:

    git push origin main
  2. Netlify Dashboard:

    • Idź na netlify.com
    • Znajdź swój site
    • Kliknij "Retry deploy"
    • ✅ Build powinien się udać!
  3. Live URL:

    • https://your-app-name.netlify.app
    • Automatyczne HTTPS ✅
    • Auto-deploy na każdy git push ✅

🛠️ JEŚLI DALEJ NIE DZIAŁA:

Option 1: Manual Deploy

npm run build
# Drag & drop folder 'dist' na netlify.com

Option 2: Alternative Hosting

# Vercel (alternatywa)
# 1. vercel.com
# 2. Import GitHub repo
# 3. Auto-deploy

Option 3: GitHub Pages

# Settings → Pages → Source: GitHub Actions

✅ PODSUMOWANIE:

Problem: Next.js plugin w React aplikacji Fix: Usunięty plugin z netlify.toml Rezultat: Deployment powinien działać!

🎉 Po naprawie - aplikacja będzie LIVE na Netlify!


Czas naprawy: ~30 sekund ⏱️