diff --git a/install.sh b/install.sh index dad53c1..0dd5813 100755 --- a/install.sh +++ b/install.sh @@ -95,7 +95,6 @@ log_step "[2/9] Instalando dependencias del sistema (apt)" sudo apt-get update if sudo apt-get install -y \ python3 python3-venv python3-pip \ - nodejs npm \ git cmake build-essential pkg-config \ libsdl2-dev libgles2-mesa-dev mesa-common-dev libglm-dev libpoco-dev \ pulseaudio-utils \ @@ -108,6 +107,19 @@ else exit 1 fi +# Node.js y npm. Si ya estan (por ejemplo instalados desde NodeSource) no se +# tocan: el paquete 'npm' de Debian entra en conflicto con el 'nodejs' de +# NodeSource, y forzarlo rompe la instalacion entera. +if need_cmd node && need_cmd npm; then + log_ok "Node.js y npm ya estaban instalados ($(node --version 2>/dev/null))" +elif need_cmd node; then + warn "Node.js esta, pero falta npm; instalalo con el mismo metodo que node" +elif sudo apt-get install -y nodejs npm 2>/dev/null; then + log_ok "Node.js y npm instalados" +else + warn "no se pudo instalar Node.js; instalalo a mano (apt o NodeSource) y reintenta" +fi + # El navegador se llama 'chromium' en Debian/Ubuntu/Mint actuales y # 'chromium-browser' en Raspberry Pi OS. Instalamos el que exista. if need_cmd chromium || need_cmd chromium-browser; then