Skip to content

Fix conductor-setup.sh to use pnpm instead of yarn #2188

@justin808

Description

@justin808

Problem

The Conductor workspace setup fails with the following error:

📦 Installing JavaScript dependencies...
error This project's package.json defines "packageManager": "yarn@pnpm@9.14.2". However the current global version of Yarn is 1.22.22.

Presence of the "packageManager" field indicates that the project is meant to be used with Corepack, a tool included by default with all official Node.js distributions starting from 16.9 and 14.19.
Corepack must currently be enabled by running corepack enable in your terminal.

Root Cause

The conductor-setup.sh script (used by Conductor to set up workspaces) still references yarn commands, but the project has been migrated to use pnpm (see PR #2121 which migrated from Yarn Classic to pnpm).

Specifically, in conductor-setup.sh:

  • Line 19: command -v yarn >/dev/null 2>&1 - checks for yarn
  • Line 59: yarn install - uses yarn to install dependencies
  • Line 63-64: yarn run build - uses yarn to build
  • Line 76: yarn run type-check - uses yarn for type checking
  • Line 83: yarn run test - prints yarn command in help

Solution

Update conductor-setup.sh to:

  1. Check for pnpm instead of yarn (or use corepack enable to auto-detect)
  2. Replace all yarn commands with pnpm equivalents:
    • yarn installpnpm install
    • yarn run buildpnpm run build
    • yarn run type-checkpnpm run type-check
    • yarn run testpnpm run test

Additional Considerations

  • Could also add corepack enable at the start of the script to ensure the correct package manager version is used
  • The help text at the end should also be updated to reference pnpm instead of yarn

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions