danhunsaker / clover-reporter-action

Comments a pull request with the jest code coverage
5 stars 8 forks source link

Error using as GitHub Action #1

Open danhunsaker opened 3 years ago

danhunsaker commented 3 years ago

The following error prevents the Action from actually running. It seems to be tied to an XML library.

/__w/_actions/danhunsaker/clover-reporter-action/v0.2.17-clover/dist/main.js:24888
    extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
                                                                                                                                                                                                  ^

TypeError: Cannot read property 'prototype' of undefined
    at extend (/__w/_actions/danhunsaker/clover-reporter-action/v0.2.17-clover/dist/main.js:24888:195)
    at /__w/_actions/danhunsaker/clover-reporter-action/v0.2.17-clover/dist/main.js:24902:5
    at /__w/_actions/danhunsaker/clover-reporter-action/v0.2.17-clover/dist/main.js:25180:5
    at /__w/_actions/danhunsaker/clover-reporter-action/v0.2.17-clover/dist/main.js:25182:4
    at createCommonjsModule (/__w/_actions/danhunsaker/clover-reporter-action/v0.2.17-clover/dist/main.js:28:35)
    at Object.<anonymous> (/__w/_actions/danhunsaker/clover-reporter-action/v0.2.17-clover/dist/main.js:24884:18)
    at Module._compile (internal/modules/cjs/loader.js:959:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Function.Module._load (internal/modules/cjs/loader.js:727:14)
danhunsaker commented 3 years ago

Currently resolved by manually moving the XMLNode definition before XMLElement (and the other types that inherit from it). Need to find a way to resolve this automatically during the build, though.