eliza icon indicating copy to clipboard operation
eliza copied to clipboard

Error: Property 'clients' does not exist on type 'Plugin' in src/index.ts during pnpm start

Open monilpat opened this issue 1 year ago • 0 comments

Title:

Error: Property 'clients' does not exist on type 'Plugin' in src/index.ts during pnpm start from latest build as of yesterday and still exists today


Describe the bug

When running the command pnpm start --characters="characters/character.character.json", the build fails with TypeScript errors in src/index.ts. Specifically, the errors occur because the Plugin type does not include a clients property.

The following errors are observed:

src/index.ts:206:24 - error TS2339: Property 'clients' does not exist on type 'Plugin'.

206             if (plugin.clients) {
                           ~~~~~~~

src/index.ts:207:45 - error TS2339: Property 'clients' does not exist on type 'Plugin'.

207                 for (const client of plugin.clients) {
                                                ~~~~~~~

The issue seems to originate from an outdated or incorrect type definition for Plugin.


To Reproduce

  1. Clone the repository and navigate to the project directory.
  2. Run the following commands:
    pnpm install
    pnpm start --characters="characters/character.character.json"
    
  3. Observe the TypeScript build errors.

Expected behavior

The project should successfully build and start without errors. Type definitions for Plugin should include the clients property, or the code should handle cases where clients is not defined.

monilpat avatar Nov 19 '24 19:11 monilpat