[TS] Published 0.9.13 ships a stale dist/telemetry.js that require()s the removed @sentry/node, every CLI command crashes
Bug
[email protected] (npm, TypeScript SDK) crashes on every CLI invocation:
$ npx deepeval --help
Error: Cannot find module '@sentry/node'
Require stack:
- node_modules/deepeval/dist/telemetry.js
- node_modules/deepeval/dist/cli/auth/flow.js
- node_modules/deepeval/dist/cli/commands/auth.js
- node_modules/deepeval/dist/cli/index.jsRoot cause
The source was already fixed in 4d65c3711 (2026-08-09, "fix telemetry"): typescript/src/telemetry.ts was deleted, replaced by the typescript/src/telemetry/ directory, and @sentry/node was removed from typescript/package.json. Current main is clean.
But the published tarball still contains a stale dist/telemetry.js sitting next to the correct dist/telemetry/ directory. That orphan file is compiled output from the deleted src/telemetry.ts. It still has a top-level require("@sentry/node"), plus the removed New Relic OTLP code and an // Initialize Sentry, PostHog, New Relic comment (New Relic was removed in #2364).
dist/cli/auth/flow.js does require("../../telemetry"). Node resolves ../../telemetry to telemetry.js (a file) before telemetry/index.js (a directory), so it loads the orphan and throws, because @sentry/node is no longer a dependency.
The build script (tsc && tsc-alias && ...) has no clean step, so tsc never removed the stale dist/telemetry.js. It has shipped in 0.9.10 through 0.9.13.
To reproduce
mkdir repro && cd repro && npm init -y
npm install --save-dev [email protected] vitest
npx deepeval --helpImpact
Every CLI entrypoint is dead on a fresh install. DEEPEVAL_TELEMETRY_OPT_OUT does not help: the require runs at module load, before any opt-out check.
Suggested fix
Add a clean step before compiling, e.g. "build": "rimraf ./dist && tsc && tsc-alias && ...", and republish. Optionally have flow.js import ../../telemetry/index explicitly so a file/dir name collision can't reoccur.
Workaround
rm node_modules/deepeval/dist/telemetry.js # require("../../telemetry") then resolves to telemetry/index.jsor npm i -D @sentry/node to satisfy the dead import.
Environment
deepeval0.9.13 (npm, TypeScript SDK)- Node 26.7.0, npm 12.0.2, macOS
gitHeadof the publish:c144abbce
Source: confident-ai/deepeval