Open DarokCx opened 1 year ago
@DarokCx that is because the package "generative-agents" is a local package and not available via NPM right now. We plan to publish it soon but till then, you have to clone the whole thing. Once you clone the whole repo -
install and build the core/typescript
yarn install
yarn build
next up create a link to the package
yarn link
After that, go to examples/phaser and link the package
yarn link generative-agents
now do yarn install
and yarn start
A bit cumbersome. I will see to add a package.
ok, we published it as a package here - https://npmjs.com/package/generative-agents will update the docs.
cloned the repo. in example/phaser npm install
added 1307 packages, and audited 1320 packages in 22s
Failed to compile.
Module not found: Error: Can't resolve 'generative-agents' in '\generative-agents\examples\phaser\src' ERROR in ./src/Game.tsx 7:0-74 Module not found: Error: Can't resolve 'generative-agents' in '\generative-agents\examples\phaser\src'
ERROR in ./src/pages/test.tsx 6:0-55 Module not found: Error: Can't resolve 'generative-agents' in '\generative-agents\examples\phaser\src\pages'
ERROR in ./src/phaserClasses/AgentCharacter.ts 5:0-48 Module not found: Error: Can't resolve 'generative-agents' in '\generative-agents\examples\phaser\src\phaserClasses'
webpack compiled with 3 errors ERROR in src/AgentChat.tsx:2:23 TS2307: Cannot find module 'generative-agents' or its corresponding type declarations. 1 | import React, { useState } from "react";
ERROR in src/AgentDisplay.tsx:2:23 TS2307: Cannot find module 'generative-agents' or its corresponding type declarations. 1 | // AgentDisplay.tsx
ERROR in src/data/world.ts:1:27 TS2307: Cannot find module 'generative-agents' or its corresponding type declarations.
ERROR in src/Game.tsx:3:55 TS2307: Cannot find module 'generative-agents' or its corresponding type declarations. 1 | import React, { useRef, useState } from "react"; 2 | import PhaserGame from "./phaserGame";
ERROR in src/pages/test.tsx:2:36 TS2307: Cannot find module 'generative-agents' or its corresponding type declarations. 1 | import React, { useRef } from "react";
ERROR in src/phaserClasses/AgentCharacter.ts:3:36 TS2307: Cannot find module 'generative-agents' or its corresponding type declarations. 1 | import Phaser from "phaser"; 2 | import BubbleText from "./BubbleText";
ERROR in src/phaserClasses/AgentCharacter.ts:126:13 TS7006: Parameter 'word' implicitly has an 'any' type. 124 | return this.agent.id 125 | .split("_")
ERROR in src/phaserGame.tsx:4:23 TS2307: Cannot find module 'generative-agents' or its corresponding type declarations. Failed to compile.
Module not found: Error: Can't resolve 'generative-agents' in 'C:\Users\erikc\source\repos\generative-agents\examples\phaser\src' ERROR in ./src/Game.tsx 7:0-74 Module not found: Error: Can't resolve 'generative-agents' in 'C:\Users\erikc\source\repos\generative-agents\examples\phaser\src'
ERROR in ./src/pages/test.tsx 6:0-55 Module not found: Error: Can't resolve 'generative-agents' in 'C:\Users\erikc\source\repos\generative-agents\examples\phaser\src\pages'
ERROR in ./src/phaserClasses/AgentCharacter.ts 5:0-48 Module not found: Error: Can't resolve 'generative-agents' in 'C:\Users\erikc\source\repos\generative-agents\examples\phaser\src\phaserClasses'
webpack compiled with 3 errors ERROR in src/AgentChat.tsx:2:23 TS2307: Cannot find module 'generative-agents' or its corresponding type declarations. 1 | import React, { useState } from "react";
ERROR in src/AgentDisplay.tsx:2:23 TS2307: Cannot find module 'generative-agents' or its corresponding type declarations. 1 | // AgentDisplay.tsx
ERROR in src/data/world.ts:1:27 TS2307: Cannot find module 'generative-agents' or its corresponding type declarations.
ERROR in src/Game.tsx:3:55 TS2307: Cannot find module 'generative-agents' or its corresponding type declarations. 1 | import React, { useRef, useState } from "react"; 2 | import PhaserGame from "./phaserGame";
ERROR in src/pages/test.tsx:2:36 TS2307: Cannot find module 'generative-agents' or its corresponding type declarations. 1 | import React, { useRef } from "react";
ERROR in src/phaserClasses/AgentCharacter.ts:3:36 TS2307: Cannot find module 'generative-agents' or its corresponding type declarations. 1 | import Phaser from "phaser"; 2 | import BubbleText from "./BubbleText";
ERROR in src/phaserClasses/AgentCharacter.ts:126:13 TS7006: Parameter 'word' implicitly has an 'any' type. 124 | return this.agent.id 125 | .split("_")
ERROR in src/phaserGame.tsx:4:23 TS2307: Cannot find module 'generative-agents' or its corresponding type declarations. 2 | import Phaser from "phaser"; 3 | import { MainScene } from "./scenes/MainScene";
ERROR in src/scenes/MainScene.ts:2:23 TS2307: Cannot find module 'generative-agents' or its corresponding type declarations. 1 | import Phaser from "phaser";