Cannot find module '@ai16z/eliza' or its corresponding type declarations.
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
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’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.
In my VSCode, it shows that @ai16z/ cannot be found.
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.

Glad I'm not the only one. Exact same issue on a fresh Debian 12.
EDIT: Solved by doing a
pnpm buildafterpnpm 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.
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
It does but that sucks, need to use turborepo