Nametag: fix missing tailwindcss module (#15955)

* Fix Nametag update failing with missing tailwindcss module

npm ci during update ran with devDependencies omitted, likely because
NODE_ENV=production was already present in the environment by then
(npm's documented default: omit=dev when NODE_ENV=production). Since
@tailwindcss/postcss is a devDependency, the subsequent `npm run build`
failed with "Cannot find module '@tailwindcss/postcss'". Force devDeps
to be installed regardless of NODE_ENV via --include=dev.

* Apply --include=dev to fresh installs too, for parity with update fix

Couldn't confirm within this repo why devDependencies would only be
omitted on update and not on a fresh install - create_backup/
restore_backup are plain file copies and nothing in tools.func sets
NODE_ENV or writes an .npmrc. Since npm ci runs before .env is sourced
in both scripts, apply the same explicit --include=dev to the installer
as defense-in-depth against the same class of failure.
This commit is contained in:
CanbiZ (MickLesk)
2026-07-22 08:18:01 +02:00
committed by GitHub
parent fe01d670f6
commit b2d54f2a72
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -43,7 +43,7 @@ function update_script() {
msg_info "Rebuilding Application"
cd /opt/nametag
$STD npm ci
$STD npm ci --include=dev
set -a
source /opt/nametag/.env
set +a
+1 -1
View File
@@ -20,7 +20,7 @@ fetch_and_deploy_gh_release "nametag" "mattogodoy/nametag" "tarball" "latest" "/
msg_info "Setting up Application"
cd /opt/nametag
$STD npm ci
$STD npm ci --include=dev
DATABASE_URL="postgresql://${PG_DB_USER}:${PG_DB_PASS}@127.0.0.1:5432/${PG_DB_NAME}" $STD npx prisma generate
DATABASE_URL="postgresql://${PG_DB_USER}:${PG_DB_PASS}@127.0.0.1:5432/${PG_DB_NAME}" $STD npx prisma migrate deploy
msg_ok "Set up Application"