0

i run this command "npx hardhat run scripts/deploy.js --network localhost"get this error

Error HH411: The library @openzeppelin/contracts, imported from contracts/VotingContract.sol, is not installed. Try installing it using npm.

I have install openzeppellin many times still its showing this error.vs code solidity file

I already gone on hardhat website. here is the hardhat error.

HH411: Invalid import: library not installed A Solidity file is trying to import another which belongs to a library that is not installed.what is the solution for this?

  • You must install the openzeppelin smart contract dependencies. In this case, the package that you need is: https://www.npmjs.com/package/@openzeppelin/contracts – Antonio Carito Dec 06 '22 at 11:54

1 Answers1

-1

https://gist.github.com/alkavan/017242ddea26d37564dd6bf9509e1314 go there or run that npm install @openzeppelin/contracts

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Dec 12 '22 at 10:07