diff --git a/lib/helpers.js b/lib/helpers.js index 40c7b14..5fb9e89 100644 --- a/lib/helpers.js +++ b/lib/helpers.js @@ -1,6 +1,10 @@ import { ACCOUNT_EMAIL, ACCOUNT_ID, API_HOST, API_TOKEN } from "./constants.js"; if (!globalThis.fetch) { + console.warn("\nIMPORTANT: Your Node.js version doesn't have native fetch support and may not be supported in the future. Please update to v18 or later.\n") + // Advise what to do if running in GitHub Actions + if (process.env.GITHUB_WORKSPACE) console.warn("Since you're running in GitHub Actions, you should update your Actions workflow configuration to use Node v18 or higher.") + // Import node-fetch since there's no native fetch in this environment globalThis.fetch = (await import("node-fetch")).default; }