An unexpected error occurred:
/Users/daniel.hursan/dev/blockchain-template/node_modules/hardhat-deploy/types.ts:2
import 'hardhat/types/runtime';
^^^^^^
SyntaxError: Cannot use import statement outside a module
at Object.compileFunction (node:vm:352:18)
at wrapSafe (node:internal/modules/cjs/loader:1033:15)
at Module._compile (node:internal/modules/cjs/loader:1069:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
at Object.require.extensions.<computed> [as .ts] (/Users/daniel.hursan/dev/blockchain-template/node_modules/ts-node/src/index.ts:1587:43)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/Users/daniel.hursan/dev/blockchain-template/test/Diamond/DiamondTemplate.ts:3:1)
It seems that only that particular call triggers the error and invokes the hardhat/types/runtime at some point
I've also tried to add "type": "modules" in package.json, which triggers other errors and it's not a solution, because I can't change requires with imports for dependencies of hardhat-deploy.
To Reproduce
Steps to reproduce the behavior:
Add a test for interacting with DiamondCutFacet contract
Attempt to call diamondCut() method
See error
If I comment out that first piece of code, error goes away.
Expected behavior
I would expect any error related to my code, missing function or whatever helpful, but stracktrace points to some internal references. Not sure if it's a conflict between hardhat-waffle and hardhat-deploy-ethers, that I understand use hardhat-ethers behind the scenes, but different forks.
Describe the bug I'm running into an error when adding a test for a simple diamond use case. From what I see, it all boils down to this method call
Error encountered is the following
It seems that only that particular call triggers the error and invokes the
hardhat/types/runtime
at some point I've also tried to add"type": "modules"
in package.json, which triggers other errors and it's not a solution, because I can't change requires with imports for dependencies of hardhat-deploy.To Reproduce Steps to reproduce the behavior:
Expected behavior I would expect any error related to my code, missing function or whatever helpful, but stracktrace points to some internal references. Not sure if it's a conflict between hardhat-waffle and hardhat-deploy-ethers, that I understand use hardhat-ethers behind the scenes, but different forks.
versions