Skip to content

[JS] missing uuid import on 0.9 RC #1184

Closed
@cabljac

Description

@cabljac

Describe the bug

Running a simple flow in Next.js (in a test) it complained about missing uuid.

I'm not 100% this is a genkit issue, but my flow was just this:

import { z } from "genkit";
import { ai } from "../genkit";

export const mainFlow = ai.defineFlow(
  {
    name: "mainFlow",
    inputSchema: z.string(),
    outputSchema: z.string(),
  },
  async (input) => input
);

and my test:

import { describe, it, expect } from "vitest";
import { mainFlow } from "./mainFlow";

describe("mainFlow", () => {
  it("should run", async () => {
    const result = await mainFlow("hello");
    expect(result).toBe("hello");
  });
});

Expected behavior
Not to need to install uuid as a dependency, probably

Screenshots
Screenshot 2024-11-05 at 20 17 41

Runtime (please complete the following information):

  • OS: [MacOS]

** Node version
❯ node --version
v20.11.1

Additional context
This is on the 0.9 RC

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingjs

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions