Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smock hardhat plugin no longer works with hardhat@2.4.0 #1118

Closed
JasoonS opened this issue Jun 18, 2021 · 2 comments
Closed

Smock hardhat plugin no longer works with hardhat@2.4.0 #1118

JasoonS opened this issue Jun 18, 2021 · 2 comments

Comments

@JasoonS
Copy link

JasoonS commented Jun 18, 2021

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.

To Reproduce
Steps to reproduce the behavior:

  1. Go to tests that use hardhat/waffle and smock.
  2. Upgrade to the latest version of hardhat (https://github.com/nomiclabs/hardhat/releases/tag/hardhat-core-v2.4.0)
  3. Run the tests

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.
@JasoonS
Copy link
Author

JasoonS commented Jun 18, 2021

Ok, I see this PR already: #1112

Thanks for working so fast :)

@JasoonS JasoonS closed this as completed Jun 18, 2021
@smartcontracts
Copy link
Contributor

Will have a release out soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants