-
Notifications
You must be signed in to change notification settings - Fork 744
Closed
Labels
Description
Node version (or tell us if you're using electron or some other framework):
v16, v18, or v20
ShellJS version (the most recent version/Github branch you see the bug on):
main git branch
Operating system:
All
Description of the bug:
It looks like CI is broken right now. It appears that nyc is running into a bug on node v16, v18, and v20. See this CI run for an example: https://github.com/shelljs/shelljs/actions/runs/5956710281/job/16287478757?pr=1129. Here's the main stack that I see:
/home/runner/work/shelljs/shelljs/node_modules/append-transform/index.js:1
TypeError [ERR_INVALID_ARG_TYPE]: The "mod" argument must be an instance of Module. Received an instance of Module
at new NodeError (node:internal/errors:387:5)
at makeRequireFunction (node:internal/modules/cjs/helpers:74:11)
at Module._compile (node:internal/modules/cjs/loader:1188:19)
at Module.replacementCompile (/home/runner/work/shelljs/shelljs/node_modules/append-transform/index.js:58:[13](https://github.com/shelljs/shelljs/actions/runs/5956710281/job/16287478757?pr=1129#step:5:14))
at Module._extensions..js (node:internal/modules/cjs/loader:1252:10)
at /home/runner/work/shelljs/shelljs/node_modules/append-transform/index.js:62:4
at Module._extensions..js (node:internal/modules/cjs/loader:1252:10)
at /home/runner/work/shelljs/shelljs/node_modules/append-transform/index.js:62:4 {
code: 'ERR_INVALID_ARG_TYPE'
This appears to have regressed recently, so maybe this is a change in the latest node LTS versions.
Example ShellJS command to reproduce the error:
N/A. This reproduces with npm run test-with-coverage.