I'm planning to switch to vitest. The migration is quite easy (the tests declaration is the same. The only changes are import statement, and package.json file). But I can't make it work. In CI test, I got error:
internal/process/esm_loader.js:74
internalBinding('errors').triggerUncaughtException(
^
Error [ERR_UNKNOWN_BUILTIN_MODULE]: No such built-in module: node:timers/promises
at new NodeError (internal/errors.js:322:7)
at Loader.builtinStrategy (internal/modules/esm/translators.js:289:11)
at new ModuleJob (internal/modules/esm/module_job.js:63:26)
at Loader.getModuleJob (internal/modules/esm/loader.js:258:11)
at async ModuleWrap.<anonymous> (internal/modules/esm/module_job.js:78:21)
at async Promise.all (index 1)
at async link (internal/modules/esm/module_job.js:83:9) {
code: 'ERR_UNKNOWN_BUILTIN_MODULE'
}
npm ERR! Test failed. See above for more details.
However, I can reproduce this problem locally.
I'm planning to switch to vitest. The migration is quite easy (the tests declaration is the same. The only changes are import statement, and
package.jsonfile). But I can't make it work. In CI test, I got error:However, I can reproduce this problem locally.