Hello! I am trying to use ethernaut to get some ctf practice on local since it is much easier to manage there but I am having trouble going through the steps to successfully deploy it on a local network.
This is what my terminal returns after following step 6 of the https://github.com/OpenZeppelin/ethernaut guide:
ethernaut ➤ yarn deploy:contracts git:master*
yarn run v1.22.19
$ yarn compile:contracts && node --experimental-json-modules client/scripts/deploy_contracts.mjs
$ cd contracts && hardhat clean && hardhat compile
contracts/levels/Denial.sol:23:9: Warning: Return value of low-level calls not used.
partner.call{value:amountToSend}("");
^----------------------------------^
contracts/levels/Preservation.sol:22:5: Warning: Return value of low-level calls not used.
timeZone1Library.delegatecall(abi.encodePacked(setTimeSignature, _timeStamp));
^---------------------------------------------------------------------------^
contracts/levels/Preservation.sol:27:5: Warning: Return value of low-level calls not used.
timeZone2Library.delegatecall(abi.encodePacked(setTimeSignature, _timeStamp));
^---------------------------------------------------------------------------^
contracts/levels/RecoveryFactory.sol:12:27: Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
function createInstance(address _player) override public payable returns (address) {
^-------------^
Compiled 89 Solidity files successfully
node:internal/errors:465
ErrorCaptureStackTrace(err);
^
TypeError [ERR_IMPORT_ASSERTION_TYPE_MISSING]: Module "file:///home/anthem/Code/ethernaut/client/src/gamedata/gamedata.json" needs an import assertion of type "json"
at new NodeError (node:internal/errors:372:5)
at validateAssertions (node:internal/modules/esm/assert:82:15)
at defaultLoad (node:internal/modules/esm/load:24:3)
at ESMLoader.load (node:internal/modules/esm/loader:407:26)
at ESMLoader.moduleProvider (node:internal/modules/esm/loader:326:22)
at new ModuleJob (node:internal/modules/esm/module_job:66:26)
at ESMLoader.#createModuleJob (node:internal/modules/esm/loader:345:17)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:304:34)
at async ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:82:21)
at async Promise.all (index 7) {
code: 'ERR_IMPORT_ASSERTION_TYPE_MISSING'
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
ethern
Any help fixing this error would be much appreciated.