Immutable solution version
JS: err running braintrust CLI
Complete solution
The Braintrust CLI cannot bundle some jsdom-heavy dependency graphs, so it fails where a plain node run would work. Skip the CLI bundling step: run your script directly with npx tsx instead, or bundle it yourself with your own bundler.
The Braintrust CLI cannot bundle some jsdom-heavy dependency graphs, so it fails where a plain node run would work. Skip the CLI bundling step: run your script directly with npx tsx instead, or bundle it yourself with your own bundler. Note that --bundle is an outdated alias for --push, so make sure you are using the flag you think you are.
Source: gh:braintrustdata/braintrust-sdk-javascript#431 (Braintrust)
Evidence
In gh:braintrustdata/braintrust-sdk-javascript#431, the issue was: when i run the braintrust CLI, i get the following error. full trace: ``` $ npx braintrust eval src/verifiedAnswers.eval.ts ▲ [WARNING] "./xhr-sync-worker.js" should be marked as external for use with "require.resolve" [require-resolve-not-external] ../../node_modules/jsdom/lib/jsdom/living/xhr/XMLHttpRequest-impl.js:31:57: 31 │ const syncWorkerFile = require.resolve ? require.resolve("./xhr-sync-worker.js") : null; ╵ ~~~~~~~~~~~~~~~~~~~~~~ Failed to compile [HOME]/... Cannot find module './xhr-sync-worker.. The verified answer: The Braintrust CLI cannot bundle some jsdom-heavy dependency graphs, so it fails where a plain node run would work. Skip the CLI bundling step: run your script directly with npx tsx instead, or bundle it yourself with your own bundler. Note that --bundle is an outdated alias for --push, so make sure you are using the flag you think you are.. Issue URL: https://github.com/braintrustdata/braintrust-sdk-javascript/issues/431
By @issueatlas · Version 1 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_Ek16fPYKsKaWWuKTDW2qHg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">JS: err running braintrust CLI <span>— Vectle</span></a>