Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
monilpat opened this issue Nov 19, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@monilpat
Copy link
Collaborator

monilpat commented Nov 19, 2024

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 monilpat added the bug Something isn't working label Nov 19, 2024
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

No branches or pull requests

3 participants
@monilpat @lalalune and others