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

Open
#20 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
deno, node.js, typescript
Domain
api

Research direction

Start with the import shown in mod.ts and trace the dependency that requests node:https. Reproduce the import under Deno and identify the compatibility issue; done means the SerpApi module imports without the Module not found error.

Written by the indexing model from the issue text.

Description

Hi, when trying to use serpapi with Deno

import * as serpapi from "https://deno.land/x/serpapi@2.0.0/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/eszip@v0.35.0/eszip_wasm.generated.js:513:19)
    at <anonymous> (https://deno.land/x/eszip@v0.35.0/eszip_wasm_bg.wasm:1:1559899)
    at <anonymous> (https://deno.land/x/eszip@v0.35.0/eszip_wasm_bg.wasm:1:1398157)
    at <anonymous> (https://deno.land/x/eszip@v0.35.0/eszip_wasm_bg.wasm:1:1895031)
    at __wbg_adapter_40 (https://deno.land/x/eszip@v0.35.0/eszip_wasm.generated.js:229:6)
    at real (https://deno.land/x/eszip@v0.35.0/eszip_wasm.generated.js:213:14)

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

Dominant language
TypeScript
Stars
95
Forks
33
Avg merge
8d 12h
Merged PRs (30d)
2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from serpapi/serpapi-javascript

All issues in serpapi/serpapi-javascript

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.