serpapi-javascript icon indicating copy to clipboard operation
serpapi-javascript copied to clipboard

Uncaught (in promise) Error: Module not found "node:https".

Open harrisrobin opened this issue 2 years ago • 4 comments

Hi, when trying to use serpapi with Deno

import * as serpapi from "https://deno.land/x/[email protected]/mod.ts";

I run into the following error:

error: Uncaught (in promise) Error: Module not found "node:https".
      const ret = new Error(getStringFromWasm0(arg0, arg1));
                  ^
    at __wbg_new_8d2af00bc1e329ee (https://deno.land/x/[email protected]/eszip_wasm.generated.js:513:19)
    at <anonymous> (https://deno.land/x/[email protected]/eszip_wasm_bg.wasm:1:1559899)
    at <anonymous> (https://deno.land/x/[email protected]/eszip_wasm_bg.wasm:1:1398157)
    at <anonymous> (https://deno.land/x/[email protected]/eszip_wasm_bg.wasm:1:1895031)
    at __wbg_adapter_40 (https://deno.land/x/[email protected]/eszip_wasm.generated.js:229:6)
    at real (https://deno.land/x/[email protected]/eszip_wasm.generated.js:213:14)

I'm new to Deno, and not sure what I'm doing wrong. Any ideas?

harrisrobin avatar Nov 06 '23 11:11 harrisrobin

@harrisrobin Which version of Deno are you using?

zyc9012 avatar Nov 06 '23 12:11 zyc9012

@harrisrobin Which version of Deno are you using? deno 1.37.2

node v18.15.0

Some more info:

this happens specifically when i try to deploy my supabase edge function and downgrading to serpapi 1.1.1 solved the issue for me which is okay for now.

harrisrobin avatar Nov 06 '23 12:11 harrisrobin

@harrisrobin It turns out that supabase cli doesn't support building edge function that imports modules with node specifiers for now.

I've created an issue there: https://github.com/supabase/cli/issues/1640

zyc9012 avatar Nov 07 '23 07:11 zyc9012

@harrisrobin It turns out that supabase cli doesn't support building edge function that imports modules with node specifiers for now.

I've created an issue there: supabase/cli#1640

thanks for looking into it. i subscribed to the issue

harrisrobin avatar Nov 07 '23 08:11 harrisrobin