Skip to content
This repository was archived by the owner on Apr 24, 2025. It is now read-only.
This repository was archived by the owner on Apr 24, 2025. It is now read-only.

ReferenceError: fetch is not defined (node 16) #15

@augustresende

Description

@augustresende

(REDACTED (local paths)/node_modules/@zbd/node/src/utils.ts:22
}) {
^
ReferenceError: fetch is not defined
at postData (node_modules/@zbd/node/src/utils.ts:22:2)
at u.d.createCharge (node_modules/@zbd/node/src/zbd.ts:51:28)
REDACTED (local paths)
at Generator.next ()

Node version v16.20.0

fetch is being called in utils.ts without importing node-fetch, and fetch is not globally available in v16 without the experimental (and maybe unsafe) flag --experimental-fetch

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions