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

Cannot find module '@ai16z/eliza' or its corresponding type declarations. #601

Closed
Howard0x3f opened this issue Nov 26, 2024 · 7 comments
Closed
Labels
bug Something isn't working

Comments

@Howard0x3f
Copy link

Environment:
WSL2 : Ubuntu-20.04
Nodejs:v23.1
pnpm:9.14.2
git checkout v0.1.3
When I run pnpm install, no errors occur.
However, when I run pnpm start --character="characters/trump.character.json", an issue arises.
pnpm --filter "@ai16z/agent" start --isRoot "--character=characters/trump.character.json"

@ai16z/[email protected] start /home/workspace/eliza/agent
tsc && node --loader ts-node/esm src/index.ts "--isRoot" "--character=characters/trump.character.json"

src/character.ts:1:64 - error TS2307: Cannot find module '@ai16z/eliza' or its corresponding type declarations.

1 import { Character, ModelProviderName, defaultCharacter } from "@ai16z/eliza";
~~~~~~~~~~~~~~

src/index.ts:1:41 - error TS2307: Cannot find module '@ai16z/adapter-postgres' or its corresponding type declarations.

1 import { PostgresDatabaseAdapter } from "@ai16z/adapter-postgres";
Describe the bug

@Howard0x3f Howard0x3f added the bug Something isn't working label Nov 26, 2024
@yodamaster726
Copy link
Contributor

I’ve run I to this issue as well. I have a fix coming for it.

Workaround is to put ../ in front of characters. ie. ../characters/trump.character.json

@Howard0x3f
Copy link
Author

I’ve run I to this issue as well. I have a fix coming for it.

Workaround is to put ../ in front of characters. ie. ../characters/trump.character.json

I changed the command to pnpm start --character="../characters/trump.character.json", but the same error still occurs.

@Howard0x3f
Copy link
Author

image
In my VSCode, it shows that @ai16z/ cannot be found.

@milezzz
Copy link

milezzz commented Nov 26, 2024

Glad I'm not the only one. Exact same issue on a fresh Debian 12.

EDIT: Solved by doing a pnpm build after pnpm i

...At least the character builds but now I have a new error: [Used disallowed intents](error: new Error("Used disallowed intents")) - looks like something I have to do with my discord bot.

EDIT #2: Fixed the intents error above by switching these 3 toggles in Discord Dev Portal. Bot seems to work now.

@yodamaster726
Copy link
Contributor

Glad I'm not the only one. Exact same issue on a fresh Debian 12.

EDIT: Solved by doing a pnpm build after pnpm i

...At least the character builds but now I have a new error: [Used disallowed intents](error: new Error("Used disallowed intents")) - looks like something I have to do with my discord bot.

EDIT #2: Fixed the intents error above by switching these 3 toggles in Discord Dev Portal. Bot seems to work now.

Would love to connect with you on discord. I'm on a similar path and want to capture any documentation items that we should capture.

My discord id is yoda26. Can you dm me back. I'll delete this message afterwards.

@yodamaster726
Copy link
Contributor

I’ve run I to this issue as well. I have a fix coming for it.
Workaround is to put ../ in front of characters. ie. ../characters/trump.character.json

I changed the command to pnpm start --character="../characters/trump.character.json", but the same error still occurs.

I believe this gets resolved if you do pnpm build and then you do the pnpm start

@lalalune
Copy link
Member

It does but that sucks, need to use turborepo

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

4 participants