fix: prepend node_modules/.bin to PATH for ng in CI
continuous-integration/drone/push Build is failing

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Rafał Miczek
2026-02-13 20:40:25 +01:00
co-authored by Cursor
parent 0ea7dc77de
commit 0866fa3e3b
2 changed files with 8 additions and 3 deletions
+1 -2
View File
@@ -9,8 +9,7 @@
"watch": "ng build --watch --configuration development",
"test": "jest",
"serve:ssr": "node scripts/serve-ssr.js",
"server:build": "ng run goals-tracker:server:production",
"build:ssr": "bun run build:prod && bun run server:build",
"build:ssr": "bun run build:prod",
"prerender": "ng run goals-tracker:prerender"
},
"private": true,
+7 -1
View File
@@ -4,5 +4,11 @@
* Use for production build so process.env is populated for environment.prod.ts.
*/
require('dotenv').config();
const path = require('path');
const { execSync } = require('child_process');
execSync('bun run build', { stdio: 'inherit', cwd: process.cwd(), shell: true });
const binDir = path.join(process.cwd(), 'node_modules', '.bin');
const pathSep = process.platform === 'win32' ? ';' : ':';
const pathEnv = binDir + pathSep + (process.env.PATH || '');
const env = { ...process.env, PATH: pathEnv };
execSync('ng build', { stdio: 'inherit', env });
execSync('ng run goals-tracker:server:production', { stdio: 'inherit', env });