-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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:
- Create a Next.js 16+ application with Turbopack.
- Run
npm install @chroma-core/google-gemini. - Import the function:
import { GoogleGeminiEmbeddingFunction } from "@chroma-core/google-gemini"; - 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