danger-js icon indicating copy to clipboard operation
danger-js copied to clipboard

GitLab hijacking other Providers? Issue in Danger's Compiled Output?

Open fbartho opened this issue 5 years ago • 3 comments

Our CI, Nevercode.io -- supported by a Provider that I added 2 years ago is running DangerJS to announce when builds are complete.

Today it started throwing Errors that include problems in the Gitlab Provider -- maybe in Global Scope?

Error Output - Looks like compilation issue?
$ /Users/greenhouse/tmpz7zloigw/node_modules/.bin/danger ci --id nevercode-announcer --dangerfile ./scripts/danger/nevercode-announcer.ts
/Users/greenhouse/tmpz7zloigw/node_modules/gitlab/dist/index.js:1
"use strict";function _interopDefault(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var universalUrl=require("universal-url"),Li=_interopDefault(require("li")),humps=require("humps"),Ky=_interopDefault(require("ky-universal")),FormData=_interopDefault(require("form-data")),queryString=require("query-string"),randomstring=_interopDefault(require("randomstring")),extendStatics=function(e,t){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function __extends(e,t){function r(){this.constructor=e}extendStatics(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var __assign=function(){return(__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,

TypeError: global$1.XMLHttpRequest is not a constructor
    at checkTypeSupport (/Users/greenhouse/tmpz7zloigw/node_modules/gitlab/dist/index.js:1:31955)
    at Object.<anonymous> (/Users/greenhouse/tmpz7zloigw/node_modules/gitlab/dist/index.js:1:32279)
    at Module._compile (internal/modules/cjs/loader.js:1158:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
    at Module.load (internal/modules/cjs/loader.js:1002:32)
    at Function.Module._load (internal/modules/cjs/loader.js:901:14)
    at Module.require (internal/modules/cjs/loader.js:1044:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at Object.<anonymous> (/Users/greenhouse/tmpz7zloigw/node_modules/danger/distribution/platforms/gitlab/GitLabAPI.js:39:16)
    at Module._compile (internal/modules/cjs/loader.js:1158:30)

I'm not sure what to do here, as A. we're not using Gitlab, B. I don't think XMLHttpRequest is the recommended API for node?

This issue seems related: https://github.com/jdalrymple/gitbeaker/issues/377 but from July of last year.

fbartho avatar Mar 06 '20 01:03 fbartho

@fbartho Is there a stable public env for us to debug? It's hard to check this problem by your description.

Soyn avatar Mar 06 '20 03:03 Soyn

@Soyn no, unfortunately this is our company's private codebase.

I'll be investigating today to try to eliminate things. Do you have any thoughts as to what context I could share that might make this more useful?

fbartho avatar Mar 06 '20 18:03 fbartho

I was on Danger 8.0, and that branch was doing a big upgrade, so maybe there's a conflict somewhere between Danger 8.0 and the other dependencies we updated. Will try to narrow it down.

fbartho avatar Mar 06 '20 19:03 fbartho

Nevercode is gone, this ticket is irrelevant now. Closing.

fbartho avatar Apr 11 '24 18:04 fbartho