Skip to content

Can't import google/generative-ai in Deno #1345

Open
@SaavanNanavati

Description

@SaavanNanavati

Bug report

  • [ X ] I confirm this is a bug with Supabase, not with my own application.
  • [ X ] I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

I can't import the Google library into my Deno edge function:

import {
    GoogleGenerativeAI,
    HarmBlockThreshold,
    HarmCategory,
} from require("npm:@google/[email protected]");

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

Try importing in any Supabase edge function.

Expected behavior

It should import fine.

System information

  • OS: MacOS
  • Browser (if applies) Chrome
  • Version of supabase-js: 2.47.10
  • Version of Node.js: 20.12.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions