install.sh: no forzar nodejs/npm de apt si Node ya esta instalado
El paquete 'npm' de Debian entra en conflicto con el 'nodejs' de NodeSource, lo que hacia fallar toda la instalacion apt. Ahora, si 'node' y 'npm' ya existen, se respetan; solo se instalan desde apt cuando faltan. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
5d5051ced3
commit
e3db98b089
1 changed files with 13 additions and 1 deletions
14
install.sh
14
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue