Skip to content

[Bug]: @chroma-core/google-gemini publishes test files to npm, breaking Next.js Turbopack #6475

@bhargavrakholiya123

Description

@bhargavrakholiya123

What happened?

The @chroma-core/google-gemini package currently includes raw testing files (specifically src/index.test.ts) when published to the npm registry.

When importing this package into a strict build environment like Next.js 15+ with Turbopack, it triggers a hard build crash because the bundler attempts to parse the uncompiled test file.

Steps to reproduce:

  1. Create a Next.js 16+ application with Turbopack.
  2. Run npm install @chroma-core/google-gemini.
  3. Import the function: import { GoogleGeminiEmbeddingFunction } from "@chroma-core/google-gemini";
  4. Run npm run dev.

Expected behavior:
The package should be published to npm without **/*.test.ts files (e.g., by adding them to .npmignore or the tsconfig.json exclude array).

(Note: I wanted to submit a PR for this, but as of right now, the source code for the google-gemini package doesn't seem to be in the clients/js/packages folder of this monorepo yet!)

Versions

Next.js: 16.1.6 (Turbopack)
Package: @chroma-core/google-gemini (latest)
OS: Windows

Relevant log output

File causing the crash: node_modules/@chroma-core/google-gemini/src/index.test.ts

Missing module type
The module type effect must be applied before adding Ecmascript transforms

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions