smartcontractkit / full-blockchain-solidity-course-js

Learn Blockchain, Solidity, and Full Stack Web3 Development with Javascript
11.94k stars 2.89k forks source link

Cloned Lesson 7 throws an error: Error: error:0308010C:digital envelope routines::unsupported #6250

Open SquilliamX opened 8 months ago

SquilliamX commented 8 months ago

Discussed in https://github.com/smartcontractkit/full-blockchain-solidity-course-js/discussions/6249

Originally posted by **SquilliamX** October 25, 2023 Hi everyone, I was having difficulty with lesson 7 (github discussion: https://github.com/smartcontractkit/full-blockchain-solidity-course-js/discussions/6237 ) and i decided to clone the lesson 7 project to reverse engineer it but even the cloned lesson 7 throws an error! I cloned the repo, ran "yarn", and updated the .env to my information. I then ran "yarn hardhat deploy --tags mocks" and it threw the error as seen below. I also then ran "source .env" and tried to run "yarn hardhat deploy --tags mocks" but it still didn't work. So all in all, it's the lesson 7 cloned repo with an updated .env and it still does not deploy the mocks. This is the error: ``` $ yarn hardhat deploy --tags mocks yarn run v1.22.19 warning package.json: No license field $ /home/smartchain/code/foundry-f23/fundme2/hardhat-fund-me-fcc/node_modules/.bin/hardhat deploy --tags mocks Nothing to compile failed to get chainId, falling back on net_version... An unexpected error occurred: Error: error:0308010C:digital envelope routines::unsupported at new Hash (node:internal/crypto/hash:71:19) at Object.createHash (node:crypto:133:10) at hash160 (/home/smartchain/code/foundry-f23/fundme2/hardhat-fund-me-fcc/node_modules/ethereum-cryptography/vendor/hdkey-without-crypto.js:249:21) at HDKey.set (/home/smartchain/code/foundry-f23/fundme2/hardhat-fund-me-fcc/node_modules/ethereum-cryptography/vendor/hdkey-without-crypto.js:50:24) at Function.HDKey.fromMasterSeed (/home/smartchain/code/foundry-f23/fundme2/hardhat-fund-me-fcc/node_modules/ethereum-cryptography/vendor/hdkey-without-crypto.js:194:20) at deriveKeyFromMnemonicAndPath (/home/smartchain/code/foundry-f23/fundme2/hardhat-fund-me-fcc/node_modules/hardhat/src/internal/util/keys-derivation.ts:21:27) at derivePrivateKeys (/home/smartchain/code/foundry-f23/fundme2/hardhat-fund-me-fcc/node_modules/hardhat/src/internal/core/providers/util.ts:29:52) at normalizeHardhatNetworkAccountsConfig (/home/smartchain/code/foundry-f23/fundme2/hardhat-fund-me-fcc/node_modules/hardhat/src/internal/core/providers/util.ts:56:10) at createProvider (/home/smartchain/code/foundry-f23/fundme2/hardhat-fund-me-fcc/node_modules/hardhat/src/internal/core/providers/construction.ts:78:59) at /home/smartchain/code/foundry-f23/fundme2/hardhat-fund-me-fcc/node_modules/hardhat/src/internal/core/runtime-environment.ts:80:28 { opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ], library: 'digital envelope routines', reason: 'unsupported', code: 'ERR_OSSL_EVP_UNSUPPORTED' } error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. ```