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

Doesn't seem to support latest hardhat version #561

Open
sirpy opened this issue Jan 21, 2025 · 7 comments
Open

Doesn't seem to support latest hardhat version #561

sirpy opened this issue Jan 21, 2025 · 7 comments

Comments

@sirpy
Copy link

sirpy commented Jan 21, 2025

Describe the bug
Error: Cannot find module 'hardhat/types/runtime'

Using hardhat 2.22.18

@supercell-art
Copy link

so...this plugin ....can't use now

@wighawag
Copy link
Owner

Can you (@sirpy / @supercell-art) provide a reproduction

I updated the latest deps on the hardhat-deploy-v1 branch of my tempalte repo : https://github.com/wighawag/template-ethereum-contracts and it works all fine on my end

(if you want to try it out, do not forget to checkout the branch hardhat-deploy-v1)

@sirpy
Copy link
Author

sirpy commented Feb 12, 2025

@wighawag are you using typescript?
the import in your code for hardhat/types/runtime doesnt work, doesnt seem to exists anymore

@wighawag
Copy link
Owner

oh you mean, compiling hardhat-deploy with newest version ?

@wighawag
Copy link
Owner

wighawag commented Feb 12, 2025

Still work for me actually

@sirpy if you have a reproduction repo, I can take a look

@sirpy
Copy link
Author

sirpy commented Feb 24, 2025

@wighawag
This is the error stack I get. Maybe the fact that its a mono-repo affects it? that it is installed in the monorepo root and not in the package node_modules.

An unexpected error occurred:

Error: Cannot find module 'hardhat/types/runtime'
Require stack:

  • /Users/hadarro/workspace/GoodDollar/GoodSDKs/node_modules/hardhat-deploy/dist/src/type-extensions.js
  • /Users/hadarro/workspace/GoodDollar/GoodSDKs/node_modules/hardhat-deploy/dist/src/index.js
  • /Users/hadarro/workspace/GoodDollar/GoodSDKs/packages/engagement-contracts/hardhat.config.ts
  • /Users/hadarro/workspace/GoodDollar/GoodSDKs/packages/engagement-contracts/node_modules/hardhat/internal/core/config/config-loading.js
  • /Users/hadarro/workspace/GoodDollar/GoodSDKs/packages/engagement-contracts/node_modules/hardhat/internal/cli/cli.js
  • /Users/hadarro/workspace/GoodDollar/GoodSDKs/packages/engagement-contracts/node_modules/hardhat/internal/cli/bootstrap.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1143:15)
    at Function.Module._resolveFilename.sharedData.moduleResolveFilenameHook.installedValue [as _resolveFilename] (/Users/hadarro/workspace/GoodDollar/GoodSDKs/node_modules/@cspotcode/source-map-support/source-map-support.js:811:30)
    at Function.Module._load (node:internal/modules/cjs/loader:984:27)
    at Module.require (node:internal/modules/cjs/loader:1231:19)
    at require (node:internal/modules/helpers:179:18)
    at Object. (/Users/hadarro/workspace/GoodDollar/GoodSDKs/node_modules/hardhat-deploy/src/type-extensions.ts:2:1)
    at Module._compile (node:internal/modules/cjs/loader:1369:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)
    at Object.require.extensions. [as .js] (/Users/hadarro/workspace/GoodDollar/GoodSDKs/packages/engagement-contracts/node_modules/ts-node/src/index.ts:1608:43)
    at Module.load (node:internal/modules/cjs/loader:1206:32) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    '/Users/hadarro/workspace/GoodDollar/GoodSDKs/node_modules/hardhat-deploy/dist/src/type-extensions.js',
    '/Users/hadarro/workspace/GoodDollar/GoodSDKs/node_modules/hardhat-deploy/dist/src/index.js',
    '/Users/hadarro/workspace/GoodDollar/GoodSDKs/packages/engagement-contracts/hardhat.config.ts',
    '/Users/hadarro/workspace/GoodDollar/GoodSDKs/packages/engagement-contracts/node_modules/hardhat/internal/core/config/config-loading.js',
    '/Users/hadarro/workspace/GoodDollar/GoodSDKs/packages/engagement-contracts/node_modules/hardhat/internal/cli/cli.js',
    '/Users/hadarro/workspace/GoodDollar/GoodSDKs/packages/engagement-contracts/node_modules/hardhat/internal/cli/bootstrap.js'
    ]
    }

@wighawag
Copy link
Owner

hmm, not sure it is hardhat-deploy related, but if you have reproduction repo, I could maybe take a look

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

3 participants