jaredpalmer / tsdx

Zero-config CLI for TypeScript package development
https://tsdx.io
MIT License
11.2k stars 505 forks source link

GitHub actions all fail because @size-limit/esbuild wants node >10 #1117

Closed chmac closed 2 years ago

chmac commented 2 years ago

Current Behavior

All GitHub actions fail. Example reproduction here.

Error is:

error @size-limit/esbuild@7.0.8: The engine "node" is incompatible with this module. Expected version "^12.0.0 || ^14.0.0 || >=16.0.0". Got "10.24.1"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Error: The process '/usr/local/bin/yarn' failed with exit code 1
    at ExecState._setResult (/home/runner/work/_actions/bahmutov/npm-install/v1/dist/index.js:969:25)
    at ExecState.CheckComplete (/home/runner/work/_actions/bahmutov/npm-install/v1/dist/index.js:952:18)
    at ChildProcess.<anonymous> (/home/runner/work/_actions/bahmutov/npm-install/v1/dist/index.js:846:27)
    at ChildProcess.emit (events.js:210:5)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
Error: The process '/usr/local/bin/yarn' failed with exit code 1

This is the first action to run, and this package fails on node 10, so the rest of the actions fail. See the example here:

https://github.com/chmac/example-github-actions-fail-node-10/runs/5197860050?check_suite_focus=true

Expected behavior

Default setup should not fail

Suggested solution(s)

Maybe remove the node 10 action? Seems like tsdx does not support it any more.

agilgur5 commented 2 years ago

Duplicate of #1089 (and #1104 after it). Thanks for providing a repro and very specific description though!

Maybe remove the node 10 action? Seems like tsdx does not support it any more.

It's not TSDX itself since v0.14.1 still supported Node 10 and there hasn't really been maintenance since then. size-limit (and many other libraries) are now ESM only, so default to Node 12+ as a result. The actual problem is that most of the dependencies in the templates (including the Actions) are not pinned and just install whatever latest is. Which causes problems when things are more than a year out-of-date.