eliza(Solana) Quick Startでpnpm buildすると「No input files, try "tsup "」エラー

eliza Quick Start(eliza-starter) を試していたときに発生したエラー。

現象

pnpm buildすると以下のエラーが発生。

% pnpm build

> @ai16z/agent@0.1.1 build /Users/256hax/Desktop/tmp/eliza-starter2
> tsup --format esm --dts

No input files, try "tsup <your-file>" instead
 ELIFECYCLE  Command failed with exit code 1.

package.json

{
  "name": "@ai16z/agent",
  "version": "0.1.1",
  "main": "src/index.ts",
  "type": "module",
  "scripts": {
    "build": "tsup --format esm --dts",
    "start": "tsc && node --loader ts-node/esm src/index.ts",
    "start:service:all": "pm2 start pnpm --name=\"all\" --restart-delay=3000 --max-restarts=10 -- run start:all",
    "stop:service:all": "pm2 stop all"
  },
  "dependencies": {
    "@ai16z/adapter-postgres": "v0.1.4-alpha.3",
    "@ai16z/adapter-sqlite": "v0.1.4-alpha.3",
    "@ai16z/client-auto": "v0.1.4-alpha.3",
    "@ai16z/client-direct": "v0.1.4-alpha.3",
    "@ai16z/client-discord": "v0.1.4-alpha.3",
    "@ai16z/client-telegram": "v0.1.4-alpha.3",
    "@ai16z/client-twitter": "v0.1.4-alpha.3",
    "@ai16z/eliza": "v0.1.4-alpha.3",
    "@ai16z/plugin-bootstrap": "v0.1.4-alpha.3",
    "@ai16z/plugin-image-generation": "v0.1.4-alpha.3",
    "@ai16z/plugin-node": "v0.1.4-alpha.3",
    "@ai16z/plugin-solana": "v0.1.4-alpha.3",
    "@ai16z/plugin-starknet": "v0.1.4-alpha.3",
    "better-sqlite3": "^11.5.0",
    "readline": "^1.3.0",
    "ws": "^8.18.0",
    "yargs": "17.7.2"
  },
  "engines": {
    "node": ">=22"
  },
  "pnpm": {
    "overrides": {
      "onnxruntime-node": "^1.20.0"
    }
  },
  "devDependencies": {
    "ts-node": "10.9.2",
    "tsup": "^8.3.5",
    "typescript": "^5.6.3"
  }
}

原因

エントリーファイル(index.tsなど)が見つからないため。

対応

エントリーファイルの場所を指定する。

package.json

    "build": "tsup src/index.ts --format esm --dts",
% pnpm build

> @ai16z/agent@0.1.1 build /Users/256hax/Desktop/tmp/eliza-starter2
> tsup src/index.ts --format esm --dts

CLI Building entry: src/index.ts
CLI Using tsconfig: tsconfig.json
CLI tsup v8.3.5
CLI Target: esnext
ESM Build start
ESM dist/index.js 26.30 KB
ESM ⚡️ Build success in 14ms
DTS Build start
DTS ⚡️ Build success in 697ms
DTS dist/index.d.ts 792.00 B