mckaywrigley/ai-brainstore

chroma/clients/js/jest.config.ts:1:29 - error TS2307: Cannot find module '@jest/types' or its corresponding type declarations.

tonihintikka opened this issue · 2 comments

I did get this error message when I try to run this.

➜ ai-brainstore git:(main) ✗ npm run agent

ai-brainstore@1.0.0 agent
npx tsc && node dist/index.js

chroma/clients/js/jest.config.ts:1:29 - error TS2307: Cannot find module '@jest/types' or its corresponding type declarations.

1 import type { Config } from '@jest/types'
~~~~~~~~~~~~~

chroma/clients/js/test/client.test.ts:1:30 - error TS2307: Cannot find module '@jest/globals' or its corresponding type declarations.

1 import { expect, test } from '@jest/globals';
~~~~~~~~~~~~~~~

Found 2 errors in 2 files.

Errors Files
1 chroma/clients/js/jest.config.ts:1
1 chroma/clients/js/test/client.test.ts:1

I installed Chroma in same folder than this project. Is it problem here?

I Have Apple M1 Pro, Ventura 13.3.1 (22E261)

This was because I had lack of packages in package.json.
This worked for me

{
"type": "module",
"name": "ai-brainstore",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"agent": "npx tsc && node dist/index.js"
},
"author": "Mckay Wrigley",
"license": "ISC",
"dependencies": {
"@jest/types": "^29.5.0",
"axios": "^0.26.1",
"chalk": "^5.2.0",
"cheerio": "^1.0.0-rc.12",
"chromadb": "^1.3.1",
"dotenv": "^16.0.3",
"hnswlib-node": "^1.4.2",
"jest": "^29.5.0",
"langchain": "^0.0.56",
"openai": "^3.2.1",
"readline": "^1.3.0",
"redis": "^4.6.5",
"typeorm": "^0.3.15"
},
"devDependencies": {
"@types/node": "^18.15.11",
"typescript": "^5.0.4"
}
}