mochajs/mocha-examples

🛠️ Repo: typescript-esm-loader failure in CI: Cannot find module 'assert'

Closed this issue · 0 comments

Example from https://github.com/mochajs/mocha-examples/actions/runs/9796737437/job/27051833313?pr=89:

typescript-esm-loader: > typescript-esm-loader@1.0.0 test /home/runner/work/mocha-examples/mocha-examples/packages/typescript-ts-node-esm-loader
typescript-esm-loader: > mocha --loader=ts-node/esm
typescript-esm-loader: (node:4083) ExperimentalWarning: --experimental-loader is an experimental feature. This feature could change at any time
typescript-esm-loader: (Use `node --trace-warnings ...` to show where the warning was created)
...
Error: typescript-esm-loader:  Exception during run: src/index.spec.ts(1,23): error TS2792: Cannot find module 'assert'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?
typescript-esm-loader: npm ERR! code ELIFECYCLE
typescript-esm-loader: npm ERR! errno 1
typescript-esm-loader: npm ERR! typescript-esm-loader@1.0.0 test: `mocha --loader=ts-node/esm`
typescript-esm-loader: npm ERR! Exit status 1
typescript-esm-loader: npm ERR! 
typescript-esm-loader: npm ERR! Failed at the typescript-esm-loader@1.0.0 test script.
typescript-esm-loader: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
typescript-esm-loader: npm ERR! A complete log of this run can be found in:
typescript-esm-loader: npm ERR!     /home/runner/.npm/_logs/2024-07-04T15_18_34_392Z-debug.log