Closed JasoonS closed 3 years ago
Describe the bug Smock hardhat plugin no longer works with hardhat@2.4.0. It works correctly on 2.3.3 and other previous versions.
2.4.0
2.3.3
To Reproduce Steps to reproduce the behavior:
Expected behavior Tests should still run.
System Specs:
Additional context See error and stacktrace below:
An unexpected error occurred: Error: Cannot find module 'hardhat/internal/hardhat-network/stack-traces/revert-reasons' Require stack: - /home/jasoons/Documents/code/monorepo/contracts/node_modules/@eth-optimism/smock/dist/src/smockit/binding.js - /home/jasoons/Documents/code/monorepo/contracts/node_modules/@eth-optimism/smock/dist/src/smockit/smockit.js - /home/jasoons/Documents/code/monorepo/contracts/node_modules/@eth-optimism/smock/dist/src/smockit/index.js - /home/jasoons/Documents/code/monorepo/contracts/node_modules/@eth-optimism/smock/dist/src/index.js - /home/jasoons/Documents/code/monorepo/contracts/test-waffle/library/smock/LongShortSmocked.js - /home/jasoons/Documents/code/monorepo/contracts/node_modules/mocha/lib/mocha.js - /home/jasoons/Documents/code/monorepo/contracts/node_modules/mocha/index.js - /home/jasoons/Documents/code/monorepo/contracts/node_modules/hardhat/builtin-tasks/test.js - /home/jasoons/Documents/code/monorepo/contracts/node_modules/hardhat/internal/core/tasks/builtin-tasks.js - /home/jasoons/Documents/code/monorepo/contracts/node_modules/hardhat/internal/core/config/config-loading.js - /home/jasoons/Documents/code/monorepo/contracts/node_modules/hardhat/internal/cli/cli.js at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15) at Function.Module._load (internal/modules/cjs/loader.js:725:27) at Module.require (internal/modules/cjs/loader.js:952:19) at require (internal/modules/cjs/helpers.js:88:18) at Object.<anonymous> (/home/jasoons/Documents/code/monorepo/contracts/node_modules/@eth-optimism/smock/src/smockit/binding.ts:3:1) at Module._compile (internal/modules/cjs/loader.js:1063:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10) at Module.load (internal/modules/cjs/loader.js:928:32) at Function.Module._load (internal/modules/cjs/loader.js:769:14) at Module.require (internal/modules/cjs/loader.js:952:19) { code: 'MODULE_NOT_FOUND', requireStack: [ '/home/jasoons/Documents/code/monorepo/contracts/node_modules/@eth-optimism/smock/dist/src/smockit/binding.js', '/home/jasoons/Documents/code/monorepo/contracts/node_modules/@eth-optimism/smock/dist/src/smockit/smockit.js', '/home/jasoons/Documents/code/monorepo/contracts/node_modules/@eth-optimism/smock/dist/src/smockit/index.js', '/home/jasoons/Documents/code/monorepo/contracts/node_modules/@eth-optimism/smock/dist/src/index.js', '/home/jasoons/Documents/code/monorepo/contracts/test-waffle/library/smock/LongShortSmocked.js', '/home/jasoons/Documents/code/monorepo/contracts/node_modules/mocha/lib/mocha.js', '/home/jasoons/Documents/code/monorepo/contracts/node_modules/mocha/index.js', '/home/jasoons/Documents/code/monorepo/contracts/node_modules/hardhat/builtin-tasks/test.js', '/home/jasoons/Documents/code/monorepo/contracts/node_modules/hardhat/internal/core/tasks/builtin-tasks.js', '/home/jasoons/Documents/code/monorepo/contracts/node_modules/hardhat/internal/core/config/config-loading.js', '/home/jasoons/Documents/code/monorepo/contracts/node_modules/hardhat/internal/cli/cli.js' ] } error Command failed with exit code 1.
Ok, I see this PR already: https://github.com/ethereum-optimism/optimism/pull/1112
Thanks for working so fast :)
Will have a release out soon!
Describe the bug Smock hardhat plugin no longer works with hardhat@
2.4.0
. It works correctly on2.3.3
and other previous versions.To Reproduce Steps to reproduce the behavior:
Expected behavior Tests should still run.
System Specs:
Additional context See error and stacktrace below: