replicate/replicate-javascript

npm test failing on Node 20

zeke opened this issue · 0 comments

zeke commented

Node.js 20 npm test used to pass, but are now failing as of Node.js v20.12.1

I can reproduce this locally on macOS with Node v20.12.1

Tests still pass on GitHub Actions running Node 18.

https://github.com/replicate/replicate-javascript/actions/runs/8622382600/job/23635903834?pr=236#step:5:16

TypeError: Cannot assign to read only property 'fetch' of object '[object global]'

    7 |   parseProgressFromLogs,
    8 | } from "replicate";
 >  9 | import nock from "nock";
      | ^
   10 | import { Readable } from "node:stream";
   11 | import { createReadableStream } from "./lib/stream";