From 4a9b63175cf1e763c8c381fc0c3790767f9e79b0 Mon Sep 17 00:00:00 2001 From: "Saad A. Bazaz" Date: Tue, 14 Jan 2025 21:03:53 +0500 Subject: [PATCH] fix: install agent's package json on build --- .../packages/react-agents-node/install-agent.mjs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/usdk/packages/upstreet-agent/packages/react-agents-node/install-agent.mjs b/packages/usdk/packages/upstreet-agent/packages/react-agents-node/install-agent.mjs index 0b4c7aefa..c77a4f9a1 100644 --- a/packages/usdk/packages/upstreet-agent/packages/react-agents-node/install-agent.mjs +++ b/packages/usdk/packages/upstreet-agent/packages/react-agents-node/install-agent.mjs @@ -4,6 +4,7 @@ import { mkdirp } from 'mkdirp'; import { rimraf } from 'rimraf'; import toml from '@iarna/toml'; import { getCurrentDirname } from '../react-agents/util/path-util.mjs'; +import { npmInstall } from '../../../../lib/npm-util.mjs'; const dirname = getCurrentDirname(import.meta, process); const copyWithStringTransform = async (src, dst, transformFn = (s) => s) => { @@ -97,6 +98,9 @@ export const installAgent = async (directory) => { }; await removeDependencies(); + // install local dependencies (from the agent's package.json) + await npmInstall(directory); + // symlink node_modules deps const addDependencies = async () => { await Promise.all(dependencies.map(async (name) => {