Search code examples
yarnpkghardhat

Trying to compile this dapp and i get this error, I do not know what to make of it, as the files are all there


PS C:\Users\MOON AI\Desktop\New folder\mantle_crowdfunding-dapp> yarn hardhat compile yarn run v1.22.19 $ "C:\Users\MOON AI\Desktop\New folder\mantle_crowdfunding-dapp\node_modules.bin\hardhat" compile An unexpected error occurred:

Error: Cannot find module '@nomiclabs/hardhat-ethers' Require stack:

  • C:\Users\MOON AI\Desktop\New folder\mantle_crowdfunding-dapp\hardhat.config.js
  • C:\Users\MOON AI\Desktop\New folder\mantle_crowdfunding-dapp\node_modules\hardhat\internal\core\config\config-loading.js
  • C:\Users\MOON AI\Desktop\New folder\mantle_crowdfunding-dapp\node_modules\hardhat\internal\cli\cli.js
  • C:\Users\MOON AI\Desktop\New folder\mantle_crowdfunding-dapp\node_modules\hardhat\internal\cli\bootstrap.js at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1048:15) at Function.Module._load (node:internal/modules/cjs/loader:901:27) at Module.require (node:internal/modules/cjs/loader:1115:19) at require (node:internal/modules/helpers:119:18) at Object. (C:\Users\MOON AI\Desktop\New folder\mantle_crowdfunding-dapp\hardhat.config.js:5:2) at Module._compile (node:internal/modules/cjs/loader:1233:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1287:10) at Module.load (node:internal/modules/cjs/loader:1091:32) at Function.Module._load (node:internal/modules/cjs/loader:938:12) at Module.require (node:internal/modules/cjs/loader:1115:19) { code: 'MODULE_NOT_FOUND', requireStack: [ 'C:\Users\MOON AI\Desktop\New folder\mantle_crowdfunding-dapp\hardhat.config.js', 'C:\Users\MOON AI\Desktop\New folder\mantle_crowdfunding-dapp\node_modules\hardhat\internal\core\config\config-loading.js', 'C:\Users\MOON AI\Desktop\New folder\mantle_crowdfunding-dapp\node_modules\hardhat\internal\cli\cli.js', 'C:\Users\MOON AI\Desktop\New folder\mantle_crowdfunding-dapp\node_modules\hardhat\internal\cli\bootstrap.js' ] } error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. PS C:\Users\MOON AI\Desktop\New folder\mantle_crowdfunding-dapp>

yarn hardhat compile


Solution

  • yarn install @nomiclabs/hardhat-ethers