Skip to content

Headers is not defined #116

@tenonin

Description

@tenonin

I tried to run the example code and give this error, but i don't know to fix

node index.js 
/mnt/c/Pitang/StableDiffusion/node_modules/replicate/index.js:189
const headers = new Headers();

ReferenceError: Headers is not defined
    at Replicate.request (/mnt/c/Pitang/StableDiffusion/node_modules/replicate/index.js:189:21)
    at Replicate.createPrediction (/mnt/c/Pitang/StableDiffusion/node_modules/replicate/lib/predictions.js:24:31)
    at Replicate.run (/mnt/c/Pitang/StableDiffusion/node_modules/replicate/index.js:116:45)
    at file:///mnt/c/Pitang/StableDiffusion/index.js:15:32
    at ModuleJob.run (node:internal/modules/esm/module_job:193:25)
    at async Promise.all (index 0)
    at async ESMLoader.import (node:internal/modules/esm/loader:533:24)
    at async loadESM (node:internal/process/esm_loader:91:5)
    at async handleMainPromise (node:internal/modules/run_main:65:12)```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions