0

While compiling below errors occurs anyone please look into this


Learn more at https://hardhat.org/hardhat-runner/docs/reference/solidity-support

An unexpected error occurred:

Error: EACCES: permission denied, mkdir '/root/.config/hardhat-nodejs'
    at Object.mkdirSync (node:fs:1336:3)
    at Object.mkdirsSync (/home/vasu/Desktop/Gravita-SmartContracts/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js:31:9)
    at getConfigDirSync (/home/vasu/Desktop/Gravita-SmartContracts/node_modules/hardhat/src/internal/util/global-dir.ts:22:6)
    at hasConsentedTelemetry (/home/vasu/Desktop/Gravita-SmartContracts/node_modules/hardhat/src/internal/util/global-dir.ts:105:21)
    at main (/home/vasu/Desktop/Gravita-SmartContracts/node_modules/hardhat/src/internal/cli/cli.ts:203:70) {
  errno: -13,
  syscall: 'mkdir',
  code: 'EACCES',
  path: '/root/.config/hardhat-nodejs'
}```
           
1
  • It seems to be an issue with the filesystem permissions. It is quite strange for a node module trying to access the /root folder. You should ask the project developers to provide a README with instructions how to use it.
    – Ismael
    May 7 at 14:09

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.