weaviate / weaviate/typescript-client
weaviate-client v3.13+ CJS build broken: nested uuid v10 dependency causes ERR_REQUIRE_ESM at runtime
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 101
- Forks
- 38
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 2
Description
After upgrading weaviate-client, the service fails on startup with:
Error [ERR_REQUIRE_ESM]: require() of ES Module
.../node_modules/weaviate-client/node_modules/uuid/dist-node/index.js
from .../weaviate-client/dist/node/cjs/collections/deserialize/index.js not supported.
Root cause
weaviate-client ships a CJS build (dist/node/cjs/) but has a nested dependency on uuid v10, which dropped CommonJS support and is now pure ESM. When Node resolves require('uuid') inside the CJS build, it finds the nested uuid v10 copy and fails.
Workaround
Manually delete the nested uuid after install:
rm -rf node_modules/weaviate-client/node_modules/uuid
This forces resolution to fall back to a top-level uuid v9 if present.
Expected behavior
The CJS build should be fully usable from a CommonJS project without workarounds. Either the internal uuid dependency should be pinned to v9, or the CJS build should use dynamic import() for uuid calls.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the startup failure from a CommonJS project and inspect dist/node/cjs/collections/deserialize/index.js together with the internal uuid dependency resolution. Verify the CJS build works without deleting the nested package, then run the existing build or test commands to confirm the ERR_REQUIRE_ESM failure is gone.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100