standard-things / esm

Tomorrow's ECMAScript modules today!
Other
5.26k stars 147 forks source link

On GitHub Actions, prints path to …/node_modules/esm/esm.js:1 and lots of code #914

Open mk-pmb opened 2 years ago

mk-pmb commented 2 years ago

Hi! I'm not sure where to start debugging, can you help me? Everything worked well on my dev machine:

> devdock-recompose-pmb@0.1.1 test
> bash test/all.sh

Lint: +OK no messages
D: Test docs/examples/ex01.devdock: pass.
D: All tests passed.

(using Node.js v16.15.0, npm v8.5.5, Ubuntu 20.04.4 LTS focal.)

… but on GitHub Actions, like in this run, esm called via esmod-pmb just prints a path and lots of code:

> devdock-recompose-pmb@0.1.1 test
> bash test/all.sh

Lint: +OK no messages
/home/runner/work/devdock-recompose-pmb-js/devdock-recompose-pmb-js/node_modules/esm/esm.js:1
const __global__ = this;(function (require, module, __shared__) { var __shared__;const e=module,t={Array:global.Array,Buffer:global.Buffer,Error:global.Error,EvalError:[…]else if(this.type.prefix){var s=thisE: 1 tests failed.

The final part "E: 1 tests failed." is from my bash script, indicating that nodejs exited with non-zero return code. It also indicates that nodejs's output was cut off mid-line. What went wrong here? Can we make the "error message" more helpful?

ted-marozzi commented 2 years ago

Having the same issue, did you happen to find a solution?

mk-pmb commented 2 years ago

I had to postpone investigation. Maybe I can continue tonight.

ted-marozzi commented 2 years ago

This happened to me when upgrading from node 12 to 16, this info might be useful. It seems that perhaps as node 16 has native module support it is not compatible.

mk-pmb commented 2 years ago

My dev machine ran Node.js v16.15.0, so that's not it. I added clarification in my original post.