Skip to content

deno v2 type error #8

@aquariuslt

Description

@aquariuslt

Bug report

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

Describe the bug

A clear and concise description of what the bug is.

To Reproduce

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

  1. create a test file under supabase recommanded folder structure, named fetch-test.ts
  2. paste below code
// @ts-ignore
import nodeFetch from '@supabase/node-fetch'

Deno.test("should compile success when use built-in node-fetch", async () => {
  const res = await nodeFetch("https://example.com");

  console.log(`res:`, res);
});
  1. run check/tests deno check supabase/functions/tests/fetcher-test.ts
  2. check console error like
error: Failed resolving types. [ERR_TYPES_NOT_FOUND] Could not find types for 'file:///Users/Jason/Repos/supabase-issue/node_modules/.deno/@[email protected]/node_modules/@supabase/node-fetch/index.js' imported from 'file:///Users/Jason/supabase-issue/supabase/functions/tests/fetch-test.ts'
    at file:///Users/Jason/Repos/supabase-issue/supabase/functions/_shared/tests/fetch-test.ts:2:23

Expected behavior

should not check @supabase-js/node-fetch typings

Screenshots

If applicable, add screenshots to help explain your problem.

System information

  • OS: [e.g. macOS, Windows] macOS with deno v2.0.3
  • Browser (if applies) [e.g. chrome, safari]
  • Version of supabase-js: [e.g. 6.0.2] v2.45.6
  • Version of Node.js: [e.g. 10.10.0] v18.18.0
  • Version of deno v2.0.3 (only happen after deno upgrade to v2)

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