From a099b0d8114a0194f2b14599ac8ef867b2a25ee6 Mon Sep 17 00:00:00 2001 From: Peter Baker Date: Fri, 2 Aug 2024 14:12:56 +1000 Subject: [PATCH] Asset bundling add npm i steps Signed-off-by: Peter Baker --- infrastructure/aws-cdk/lib/components/front-end.ts | 4 ++++ package-lock.json | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/infrastructure/aws-cdk/lib/components/front-end.ts b/infrastructure/aws-cdk/lib/components/front-end.ts index 3eecf398d..825a714c7 100644 --- a/infrastructure/aws-cdk/lib/components/front-end.ts +++ b/infrastructure/aws-cdk/lib/components/front-end.ts @@ -177,6 +177,7 @@ export class FaimsFrontEnd extends Construct { "-c", ` cd /asset-input + npm i cd ${appPath} ./${buildScript} cp -R ${outputPath}/* /asset-output @@ -201,6 +202,7 @@ export class FaimsFrontEnd extends Construct { //export environment variables - not included by default envs, `cd ${buildPath}`, + "npm i", `cd ${appPath}`, `./${buildScript}`, `cp -R ${outputPath}/* ${outputDir}`, @@ -304,6 +306,7 @@ export class FaimsFrontEnd extends Construct { "-c", ` cd /asset-input + npm i cd ${appPath} ./${buildScript} cp -R ${outputPath}/* /asset-output @@ -319,6 +322,7 @@ export class FaimsFrontEnd extends Construct { const exec = require("child_process").execSync; const commands = [ `cd ${buildPath}`, + "npm i", `cd ${appPath}`, `./${buildScript}`, `cp -R ${outputPath}/* ${outputDir}`, diff --git a/package-lock.json b/package-lock.json index 067230a01..718c28845 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3942,14 +3942,14 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/@faims-project/faims3": { - "resolved": "app", - "link": true - }, "node_modules/@faims-project/conductor": { "resolved": "api", "link": true }, + "node_modules/@faims-project/faims3": { + "resolved": "app", + "link": true + }, "node_modules/@fast-check/jest": { "version": "1.8.2", "resolved": "https://registry.npmjs.org/@fast-check/jest/-/jest-1.8.2.tgz",