-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Version of Hardhat
3.0.17
What happened?
No contracts to compile
Running Mocha tests
An unexpected error occurred:
Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'H:\Blockchain\JS\hard\nodejs' imported from H:\Blockchain\JS\hard\node_modules\mocha\lib\nodejs\esm-utils.js
at finalizeResolution (node:internal/modules/esm/resolve:274:11)
at moduleResolve (node:internal/modules/esm/resolve:864:10)
at defaultResolve (node:internal/modules/esm/resolve:990:11)
at nextResolve (node:internal/modules/esm/hooks:785:28)
at resolveBase (file:///H:/Blockchain/js/hard/node_modules/tsx/dist/esm/index.mjs?1765132150489:2:3744)
at resolveDirectory (file:///H:/Blockchain/js/hard/node_modules/tsx/dist/esm/index.mjs?1765132150489:2:4243)
at resolveTsPaths (file:///H:/Blockchain/js/hard/node_modules/tsx/dist/esm/index.mjs?1765132150489:2 at resolve (file:///H:/Blockchain/js/hard/node_modules/tsx/dist/esm/index.mjs?1765132150489:2:5361)
at nextResolve (node:internal/modules/esm/hooks:785:28)
at AsyncLoaderHooksOnLoaderHookWorker.resolve (node:internal/modules/esm/hooks:271:30) {
code: 'ERR_MODULE_NOT_FOUND',
url: 'file:///H:/Blockchain/JS/hard/nodejs'
}
Minimal reproduction steps
npx hardhat test nodejs --coverage
Proposed solution
Resolve the parameter of the test task as follows:
npx hardhat test PARAM- Process
PARAMas a file (as implemented now) in casePARAMrefers to a valid file path - Resolve
PARAMas a subtask in case it is not a valid file path- Throw the following error in case the subtask
PARAMis not validError HHE416: Unrecognized subtask "PARAM" for the task "test"
- Throw the following error in case the subtask
Metadata
Metadata
Assignees
Labels
Type
Projects
Status