eliza icon indicating copy to clipboard operation
eliza copied to clipboard

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

Open Howard0x3f opened this issue 1 year ago • 7 comments

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 avatar Nov 26 '24 01:11 Howard0x3f

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

yodamaster726 avatar Nov 26 '24 03:11 yodamaster726

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 avatar Nov 26 '24 04:11 Howard0x3f

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

Howard0x3f avatar Nov 26 '24 04:11 Howard0x3f

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.

milezzz avatar Nov 26 '24 06:11 milezzz

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 avatar Nov 26 '24 22:11 yodamaster726

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

yodamaster726 avatar Nov 27 '24 03:11 yodamaster726

It does but that sucks, need to use turborepo

lalalune avatar Nov 29 '24 19:11 lalalune