Skip to content

Conversation

@LeonRuggiero
Copy link
Contributor

Use pnpm exec tsc --build instead of tsc --build

This is what is really intended and is part of enabling production builds.

@LeonRuggiero LeonRuggiero self-assigned this Nov 17, 2025
@LeonRuggiero LeonRuggiero requested a review from a team as a code owner November 17, 2025 23:02
@LeonRuggiero LeonRuggiero added the bug Something isn't working label Nov 17, 2025
@vertesia-code-review
Copy link

vertesia-code-review bot commented Nov 17, 2025

Changes

This pull request standardizes the build process across multiple packages in the mono-repository by explicitly using pnpm exec tsc --build instead of just tsc --build. This change ensures that the TypeScript compiler is executed within the pnpm environment, which is important for dependency resolution and consistent builds. The change impacts the build scripts in packages/cli, packages/create-agent, packages/create-plugin, packages/memory-cli, packages/react, packages/ui and tools/environment-configuration. In addition, the build script within the init.ts file of the create-agent package has been updated to use pnpm exec tsc --build.

Here is a breakdown of the changes:

Path Description
packages/cli/package.json Modified the build script to use pnpm exec tsc --build to ensure the TypeScript compiler is executed within the pnpm environment.
packages/create-agent/package.json Modified the build script to use pnpm exec tsc --build to ensure the TypeScript compiler is executed within the pnpm environment.
packages/create-agent/src/init.ts Updated the build script within the init function to include pnpm exec tsc --build for consistent TypeScript compilation within the pnpm environment.
packages/create-plugin/package.json Modified the build script to use pnpm exec tsc --build to ensure the TypeScript compiler is executed within the pnpm environment.
packages/memory-cli/package.json Modified the build script to use pnpm exec tsc --build to ensure the TypeScript compiler is executed within the pnpm environment.
packages/react/package.json Modified the build script to use pnpm exec tsc --build to ensure the TypeScript compiler is executed within the pnpm environment.
packages/ui/package.json Modified the build script to use pnpm exec tsc --build to ensure the TypeScript compiler is executed within the pnpm environment.
tools/environment-configuration/package.json Modified the build and clean scripts to use pnpm exec tsc --build and pnpm exec tsc --build --clean respectively, ensuring TypeScript commands are executed within the pnpm environment.

Purpose

The motivation behind this pull request is to ensure that the tsc command is executed within the pnpm environment. This is achieved by using pnpm exec tsc --build instead of directly calling tsc --build. This change is essential for enabling reliable production builds, suggesting a problem with the existing build process when using tsc directly.

The context of this pull request is to address an issue where the TypeScript compiler (tsc) might not be running in the correct environment, specifically within the pnpm context. By explicitly using pnpm exec tsc --build, the pull request ensures that the tsc command uses the dependencies and settings managed by pnpm. The issue mentions that this change is part of a larger effort to enable production builds, indicating that the previous method was insufficient or problematic in a production environment.

Related issues: N/A

Code Review

You can start a code review by adding a comment: "Vertesia, please review".

Note that the motivation and context are rated as clear (4/5). The agent has a good understanding of the purpose of the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants