From 78e2caf16f49713f43022ba50b25233f3aa0f22c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C3=85=E2=80=9A=20Miczek?= Date: Fri, 13 Feb 2026 20:33:05 +0100 Subject: [PATCH] fix: use bunx ng to resolve Angular CLI in CI Co-authored-by: Cursor --- package.json | 2 +- scripts/build-with-env.js | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 595169a..251e559 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", + "build:ssr": "bun run build:prod && bunx ng run goals-tracker:server:production", "prerender": "ng run goals-tracker:prerender" }, "private": true, diff --git a/scripts/build-with-env.js b/scripts/build-with-env.js index f5f5c40..81d8ceb 100644 --- a/scripts/build-with-env.js +++ b/scripts/build-with-env.js @@ -1,11 +1,8 @@ #!/usr/bin/env node /** - * Loads .env and runs ng build + server build. + * Loads .env and runs ng build. * Use for production build so process.env is populated for environment.prod.ts. */ require('dotenv').config(); const { execSync } = require('child_process'); -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' }); +execSync('bunx ng build', { stdio: 'inherit' });