0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

SupabaseのEdge FunctionでDenoの型エラーが出る問題について解決しました

Posted at

image.png

Edge Functionの import 文で下記のようなエラーが出ます。

Cannot find module 'https://deno.land/std/http/server.ts' or its corresponding type declarations.

CursorのAIに聞いてもあんまり解決しなくて、「実行には問題ない」とか言われて無視していたのですが気になって調べてみたところちゃんと公式に解決策が載っていました。

VSCodeのsettingsに import_map を参照するように指定すればよいとのことです。

.vscode/settings.json
{
    "deno.importMap": "./supabase/functions/import_map.json",
    "deno.enablePaths": [
        "./supabase/functions"
    ]
}

image.png

実際にエラーが出なくなりました。AIに頼りすぎると公式情報拾えなくて、ちゃんと公式読むことも大事ですね!

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?