chroma-core / chroma-core/chroma

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

Open
#6,475 3 comments 0 reactions 1 assignee View on GitHub

@kylediaz is already working on this.

Since Mar 8, 2026.

bug
Dominant language
Rust
Stars
29.3k
Forks
2.5k
Avg merge
1d 4h
Merged PRs (30d)
38

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.