We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5710db0 commit ee39aafCopy full SHA for ee39aaf
src/api/yepcodeApi.ts
@@ -49,6 +49,11 @@ export class YepCodeApi {
49
private timeout: number;
50
51
constructor(config: YepCodeApiConfig = {}) {
52
+ if (typeof fetch !== "function") {
53
+ throw new Error(
54
+ `Global fetch API is not available. Please use Node.js 18+ or provide a global fetch polyfill (current node version: ${process.version})`
55
+ );
56
+ }
57
const finalConfig = {
58
apiHost: "https://cloud.yepcode.io",
59
timeout: 60000,
0 commit comments