Skip to content

Commit

Permalink
Merge pull request #845 from UpstreetAI/usdk-build-fix
Browse files Browse the repository at this point in the history
fix: install agent's package json on build
  • Loading branch information
mavisakalyan authored Jan 14, 2025
2 parents 9dcc16d + 4a9b631 commit 6ae419c
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down Expand Up @@ -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) => {
Expand Down

0 comments on commit 6ae419c

Please sign in to comment.