Skip to content

weaviate-client v3.13+ CJS build broken: nested uuid v10 dependency causes ERR_REQUIRE_ESM at runtime #436

Open

Description

@adambeer

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions