chroma icon indicating copy to clipboard operation
chroma copied to clipboard

[Bug]: chromadb-default-embed install can't work with pnpm

Open sunzhaoyang opened this issue 6 months ago • 2 comments

What happened?

Install chromadb-default-embed with pnpm , but still can't work.

pnpm install
Scope: all 6 workspace projects

dependencies:
+ @ai-sdk/anthropic 1.2.0
+ @ai-sdk/deepseek 0.2.0
+ @ai-sdk/openai 1.3.0
+ @ai-sdk/react 1.2.0
+ @ai-sdk/ui-utils 1.2.0
+ @aws-sdk/client-cloudwatch 3.787.0
+ @aws-sdk/client-rds 3.787.0
+ @fluentui/react-icons 2.0.297
+ @internal/components 0.0.0 <- ../../packages/components
+ @internal/theme 1.0.0 <- ../../packages/theme
+ @tailwindcss/postcss 4.1.4
+ @tanstack/react-query 5.74.4
+ @vercel/functions 2.0.0
+ @xenova/transformers 2.17.2
+ ai 4.3.9
+ bytes 3.1.2
+ canvas-confetti 1.9.3
+ chromadb 2.2.1
+ chromadb-default-embed 2.14.0
+ class-variance-authority 0.7.1
+ clsx 2.1.1
+ cron-parser 5.1.1
+ date-fns 4.1.0
+ drizzle-kit 0.30.6
+ drizzle-orm 0.41.0
+ drizzle-zod 0.7.1
+ framer-motion 12.7.4
+ geist 1.3.1
+ kysely 0.27.6
+ lucide-react 0.483.0
+ mysql2 3.14.0
+ next 15.3.1
+ next-auth 5.0.0-beta.25
+ next-themes 0.4.6
+ openai 4.95.1
+ pg 8.14.1
+ react 19.0.0
+ react-dom 19.0.0
+ react-markdown 10.1.0
+ react-syntax-highlighter 15.6.1
+ server-only 0.0.1
+ tailwind-merge 3.2.0
+ tailwindcss-animate 1.0.7
+ typescript 5.8.3
+ zod 3.24.3

devDependencies:
+ @dotenvx/dotenvx 1.41.0
+ @internal/eslint-config 0.0.0 <- ../../configs/eslint-config
+ @internal/tsconfig 0.0.0 <- ../../configs/tsconfig
+ @types/bytes 3.1.5
+ @types/canvas-confetti 1.9.0
+ @types/dockerode 3.3.38
+ @types/papaparse 5.3.15
+ @types/pg 8.11.13
+ @types/react 19.1.2
+ @types/react-dom 19.1.2
+ @types/react-syntax-highlighter 15.5.13
+ autoprefixer 10.4.21
+ dockerode 4.0.6
+ dotenv 16.5.0
+ filenamify 6.0.0
+ papaparse 5.5.2
+ postcss 8.5.3
+ tailwindcss 4.1.4
+ tsx 4.19.3

╭ Warning ───────────────────────────────────────────────────────────────────────────────────╮
│                                                                                            │
│   Ignored build scripts: cpu-features, esbuild, protobufjs, sharp, ssh2.                   │
│   Run "pnpm approve-builds" to pick which dependencies should be allowed to run scripts.   │
│                                                                                            │
╰────────────────────────────────────────────────────────────────────────────────────────────╯

../.. prepare$ husky
└─ Done in 829ms
Done in 1.6s using pnpm v10.5.2
(base) ➜  dbagent git:(rag) ✗ pnpm run init-vector

> [email protected] init-vector /Users/weixiao/projects/agent/apps/dbagent
> tsx scripts/init-vector.ts

Error: Error: Please install chromadb-default-embed as a dependency with, e.g. `npm install chromadb-default-embed`
    at Function.import (/Users/weixiao/projects/agent/node_modules/.pnpm/[email protected][email protected]/node_modules/chromadb/dist/chromadb.mjs:11079:13)
    at async _DefaultEmbeddingFunction.loadClient (/Users/weixiao/projects/agent/node_modules/.pnpm/[email protected][email protected]/node_modules/chromadb/dist/chromadb.mjs:11061:26)
    at async _DefaultEmbeddingFunction.generate (/Users/weixiao/projects/agent/node_modules/.pnpm/[email protected][email protected]/node_modules/chromadb/dist/chromadb.mjs:11011:5)
    at async prepareRecordRequest (/Users/weixiao/projects/agent/node_modules/.pnpm/[email protected][email protected]/node_modules/chromadb/dist/chromadb.mjs:9912:65)
    at async Collection.add (/Users/weixiao/projects/agent/node_modules/.pnpm/[email protected][email protected]/node_modules/chromadb/dist/chromadb.mjs:9546:7)
    at async main (/Users/weixiao/projects/agent/apps/dbagent/scripts/init-vector.ts:68:5)

Versions

"chromadb": "^2.2.1",
"chromadb-default-embed": "^2.14.0",
 pnpm --version 10.5.2

Relevant log output

Reinstall but still the same error

pnpm install chromadb-default-embed
../..                                    |  WARN  `node_modules` is present. Lockfile only installation will make it out-of-date
 WARN  5 deprecated subdependencies found: @aws-sdk/[email protected], @aws-sdk/[email protected], @esbuild-kit/[email protected], @esbuild-kit/[email protected], [email protected]
../..                                    | Progress: resolved 1167, reused 0, downloaded 0, added 0, done
 WARN  Issues with peer dependencies found
apps/dbagent
└─┬ @fluentui/react-icons 2.0.297
  ├── ✕ unmet peer react@">=16.8.0 <19.0.0": found 19.0.0
  └─┬ @griffel/react 1.5.29
    └── ✕ unmet peer react@">=16.8.0 <19.0.0": found 19.0.0

packages/components
└─┬ @fluentui/react-icons 2.0.297
  ├── ✕ unmet peer react@">=16.8.0 <19.0.0": found 19.1.0
  └─┬ @griffel/react 1.5.29
    └── ✕ unmet peer react@">=16.8.0 <19.0.0": found 19.1.0
../.. prepare$ husky
└─ Done in 980ms
Done in 4.3s using pnpm v10.5.2

sunzhaoyang avatar Apr 22 '25 02:04 sunzhaoyang