From 6c82fdee868e8d15c22c223f5b09a03d3fa39a36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C3=85=E2=80=9A=20Miczek?= Date: Fri, 13 Feb 2026 20:32:29 +0100 Subject: [PATCH] Fix: use node_modules/.bin/ng path for Drone CI Co-authored-by: Cursor --- package.json | 2 +- scripts/build-with-env.js | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 2d06c70..595169a 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "watch": "ng build --watch --configuration development", "test": "jest", "serve:ssr": "node scripts/serve-ssr.js", - "build:ssr": "bun run build:prod && ng run goals-tracker:server:production", + "build:ssr": "bun run build:prod", "prerender": "ng run goals-tracker:prerender" }, "private": true, diff --git a/scripts/build-with-env.js b/scripts/build-with-env.js index eb76f6f..f5f5c40 100644 --- a/scripts/build-with-env.js +++ b/scripts/build-with-env.js @@ -1,8 +1,11 @@ #!/usr/bin/env node /** - * Loads .env and runs ng build. + * Loads .env and runs ng build + server build. * Use for production build so process.env is populated for environment.prod.ts. */ require('dotenv').config(); const { execSync } = require('child_process'); -execSync('ng build', { stdio: 'inherit' }); +const { join } = require('path'); +const ngPath = join(process.cwd(), 'node_modules', '.bin', 'ng'); +execSync(`"${ngPath}" build`, { stdio: 'inherit' }); +execSync(`"${ngPath}" run goals-tracker:server:production`, { stdio: 'inherit' });