ai16z / eliza-starter

MIT License
34 stars 39 forks source link

Using `latest` for the @ai16z packages breaks the project. #6

Open rsmets opened 6 days ago

rsmets commented 6 days ago

Upon a fresh pnpm install, running pnpm start errors with following output:

src/index.ts:9:3 - error TS2305: Module '"@ai16z/eliza"' has no exported member 'DbCacheAdapter'.

9   DbCacheAdapter,
    ~~~~~~~~~~~~~~

src/index.ts:11:3 - error TS2305: Module '"@ai16z/eliza"' has no exported member 'FsCacheAdapter'.

11   FsCacheAdapter,
     ~~~~~~~~~~~~~~

src/index.ts:12:3 - error TS2305: Module '"@ai16z/eliza"' has no exported member 'ICacheManager'.

12   ICacheManager,
     ~~~~~~~~~~~~~

src/index.ts:13:3 - error TS2724: '"@ai16z/eliza"' has no exported member named 'IDatabaseCacheAdapter'. Did you mean 'IDatabaseAdapter'?

13   IDatabaseCacheAdapter,
     ~~~~~~~~~~~~~~~~~~~~~

src/index.ts:16:3 - error TS2305: Module '"@ai16z/eliza"' has no exported member 'CacheManager'.

16   CacheManager,
     ~~~~~~~~~~~~

src/index.ts:23:3 - error TS2305: Module '"@ai16z/eliza"' has no exported member 'validateCharacterConfig'.

23   validateCharacterConfig,
     ~~~~~~~~~~~~~~~~~~~~~~~

src/index.ts:229:5 - error TS2353: Object literal may only specify known properties, and 'cacheManager' does not exist in type '{ conversationLength?: number; agentId?: `${string}-${string}-${string}-${string}-${string}`; character?: Character; token: string; serverUrl?: string; actions?: Action[]; evaluators?: Evaluator[]; ... 8 more ...; logging?: boolean; }'.

229     cacheManager: cache,
        ~~~~~~~~~~~~

src/index.ts:248:15 - error TS2339: Property 'username' does not exist on type 'Character'.

248     character.username ??= character.name;
                  ~~~~~~~~

src/index.ts:259:14 - error TS2339: Property 'init' does not exist on type 'PostgresDatabaseAdapter | SqliteDatabaseAdapter'.
  Property 'init' does not exist on type 'PostgresDatabaseAdapter'.

259     await db.init();
                 ~~~~

src/index.ts:264:19 - error TS2339: Property 'initialize' does not exist on type 'AgentRuntime'.

264     await runtime.initialize();
                      ~~~~~~~~~~

Found 10 errors in the same file, starting at: src/index.ts:9

 ELIFECYCLE  Command failed with exit code 2.

It is not a good practice to use latest versions for dependencies. Please pin to a compatible version for project stability and usability.

rsmets commented 6 days ago

Upon trying to make the package version changes myself, none of the published ai16z package versions, currently 0.1.1, 0.1.2, and 0.1.3, match this project's source code. It seems that interfacing with these packages needs to be updated for this project to be functional.

dadsec-dev commented 6 days ago

Upon trying to make the package version changes myself, none of the published ai16z package versions, currently 0.1.1, 0.1.2, and 0.1.3, match this project's source code. It seems that interfacing with these packages needs to be updated for this project to be functional.

Hello, i had the same error when i started.

What i did was to run "PNPM INSTALL" THEN "PNPM BUILD" AND FINALLY "PNPM START"

Ensure youre running node version 23

That should do.

zk1tty commented 6 days ago

Hi, I had the exact same issue with the following env.

$ node -v
v22.11.0
$ pnpm -v
9.14.2
odilitime commented 5 days ago

pnpm build seems to be broken in f7e0490, tried to build manually with npx tsup --format esm --dts src/* and got the same error as OP

Was able to use the agent/src/index.ts from https://github.com/ai16z/eliza/blob/v0.1.3-alpha.2/agent/src/index.ts (as latest atm is v0.1.3-alpha.2) reran tsup and that seems to work

We need to tag this repo and keep it inline with @ai16z/eliza

nghiangovan commented 5 days ago

@rsmets You should delete pnpm-lock.yaml because it's out of date compared to the code. Then run pnpm install again to pull the latest packages. I tried and it worked successfully.

SouSingh commented 4 days ago

@dadsec-dev can you share package.json and code

zoe27 commented 4 days ago

seems everything goes well in my local

apple@apples-MacBook-Pro eliza-starter % node -v
v23.3.0
apple@apples-MacBook-Pro eliza-starter % pnpm -v
9.8.0 

the running log

◎ LOGS
   Registering service: 
   video 

 ["✓ Server running at http://localhost:3000/"] 
>  ["✓ Service browser initialized successfully"] 

 ["✓ Service image_description initialized successfully"] 

 ["✓ Service text_generation initialized successfully"] 

 ["✓ Service pdf initialized successfully"] 

 ["✓ Service speech_generation initialized successfully"] 

 ["✓ Service transcription initialized successfully"] 

 ["✓ Service video initialized successfully"] 

 ["◎ Chat started. Type 'exit' to quit."] 

You: