From a17f3b50bad536144c37c1f62a8dacb6c9fae1cb Mon Sep 17 00:00:00 2001 From: Heidi Date: Thu, 14 May 2026 21:06:52 +0100 Subject: [PATCH] fix --- README.md | 2 +- webhook.cjs | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 78afd70..fa3840a 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ The default deploy flow is: ```sh git pull --ff-only -npm install --production=false --include=dev --omit=optional +npm install --production=false --include=dev --include=optional npm run build pm2 reload tssbot-web --update-env ``` diff --git a/webhook.cjs b/webhook.cjs index 525f2a7..a83ad79 100644 --- a/webhook.cjs +++ b/webhook.cjs @@ -98,11 +98,11 @@ function run(command, args, options = {}) { } async function ensureBuildDependencies() { - await run('npm', ['install', '--production=false', '--include=dev', '--omit=optional'], { + await run('npm', ['install', '--production=false', '--include=dev', '--include=optional'], { env: { NODE_ENV: 'development', - npm_config_include: 'dev', - npm_config_omit: 'optional', + npm_config_include: 'dev,optional', + npm_config_omit: '', npm_config_production: 'false', }, }) @@ -112,6 +112,15 @@ async function ensureBuildDependencies() { } catch { throw new Error('@vitejs/plugin-react is missing after npm install; dev dependencies were not installed') } + + if (process.platform === 'linux' && process.arch === 'x64') { + const libc = process.report?.getReport?.().header?.glibcVersionRuntime ? 'gnu' : 'musl' + try { + require.resolve(`@rollup/rollup-linux-x64-${libc}`) + } catch { + throw new Error(`@rollup/rollup-linux-x64-${libc} is missing after npm install; optional dependencies were not installed`) + } + } } function postDiscordWebhook(payload) {