Jev directory
CommunityJev Repos & SDKs
Jev Node1
A Node.js and pnpm sample project for the TypeSafe AI JavaScript SDK 0.7.0, made because that SDK version fails on Bun with a "Body already used" error. Ships runnable Noul, Choice, Score, and Box examples plus image queries.
- Stars
- 0
- Reading time
- 2 min
- Published by
- Community
- Added
- Nov 2026
Highlights
- Uses @typesafe-ai/sdk 0.7.0 with pnpm and Node.js instead of Bun.
- Requires Node.js 22.18+ or 23.6+ to execute .ts files directly.
- Includes examples for the Noul, Choice, Score, and Box primitives.
- Image example returns cat Noul 0.97, Choice cat 0.98, bread Score medium 0.77.
- Based on heiwa4126/jev-bun1; SDK issue #20 tracks the Bun failure.
Questions about this entry
Short answers drawn from the linked project or page.
The author reports that @typesafe-ai/sdk 0.7.0 fails every request on Bun with "TypeError: Body already used" (typesafe-sdk-js issue #20). The same SDK version does not produce that error on Node.js, so this repository runs the samples with pnpm and Node.js in the meantime.
Node.js 22.18 or later, or 23.6 or later, because the samples execute .ts files directly. The --env-file-if-exists flag used for configuration needs Node.js 22.9 or later. pnpm is also required.
Run pnpm install, then copy .env.example to .env and edit it to add your API key. The first sample is pnpm ex0, matching the example in the JavaScript SDK docs. Further scripts include noul1, noul2, noul3, j-noul1, multi1, box1, and img1.
Box is described as a computer-vision-like primitive that returns the position of a specified object in an image. Running pnpm box1 searches for the target in example/imgs/ex1.jpg and writes both a result JSON and an annotated image to tmp/ex1.jpg.
On the same image, the samples ask a Noul question ("is a cat in the picture?", answered 0 to 1), a Choice question ("which animal is shown?", cat/dog/bird), and a Score question ("how toasted is the bread?", pale/medium/dark). Reported results were cat Noul 0.97, Choice cat 0.98, and bread Score medium 0.77.
The repository uses @typesafe-ai/sdk 0.7.0. That version has a known Bun problem, "TypeError: Body already used", tracked as typesafe-sdk-js issue #20, which does not occur under Node.js.
The author notes that 0.6.0 does not include the Box primitive, so the Node.js and pnpm version of the samples is used for the time being instead of reverting to the older SDK.
From the Jev guides
Original write-ups on what this entry is for.
From the Jev AI model community
Posts from builders shipping with Jev right now.