danger-js
danger-js copied to clipboard
[BUG] Error: ReferenceError: fetch is not defined
Describe the bug After updating to Danger JS 12.x I'm unable to run Danger.
To Reproduce Steps to reproduce the behavior:
- Install danger through homebrew
brew install danger/tap/danger-js
- Try to run danger
Expected behavior I expected Danger to work as I have a node version installed greater than the minimum.
Screenshots If applicable, add screenshots to help explain your problem.
Starting Danger PR on company/ios-app#5606
Error: ReferenceError: fetch is not defined
at defaultRequestHandler (/snapshot/danger-js/node_modules/@gitbeaker/rest/dist/index.js:101:22)
at Object.requester.<computed> [as get] (/snapshot/danger-js/node_modules/@gitbeaker/requester-utils/dist/index.js:53:16)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at process.runNextTicks [as _tickCallback] (node:internal/process/task_queues:65:3)
at Function.runMain (pkg/prelude/bootstrap.js:1980:13)
at node:internal/main/run_main_module:17:47
at async /snapshot/danger-js/node_modules/@gitbeaker/core/dist/index.js:105:22
Your Environment
software | version |
---|---|
danger.js | 12.2.0 |
node | v18.20.2, also tried v22.1.0 |
npm | 10.5.0 |
Operating System | macOS 14.4.1 |
Additional Context We run this in an iOS project without any JS dependencies, and I'm not too familiar with JS, so forgive me if this is a trivial issue to solve for an experienced JS engineer!