错误 HH604:运行 JSON-RPC 服务器时出错:错误:0308010C:数字信封例程::不支持
我正在 Linux 中设置安全帽.我首先使用这些命令设置了 React 应用程序.
I am setting up hardhat in Linux. I have set up the react app first using these commands.
npx create-react-app react-dapp
cd react-dapp
然后我使用这个命令安装了一些安全帽依赖项.
Then I have installed some hardhat dependencies using this command.
npm install ethers hardhat @nomiclabs/hardhat-waffle \
ethereum-waffle chai \
@nomiclabs/hardhat-ether
这一切都做对了.然后我创建了安全帽配置和设置.
This all done correctly. Then I have created the hardhat configs and setup.
npx hardhat
然后我编辑了 hardhat.config.js 文件.我有这个地方.
Then I have edited the hardhat.config.js file. I have places this.
module.exports = {
solidity: "0.8.4",
paths: {
artifacts: './src/artifacts',
},
networks: {
hardhat: {
chainId: 1337
}
}};之后我创建了节点.
} }; After that I have created the node.
npx hardhat node
我收到此错误:
错误 HH604:运行 JSON-RPC 服务器时出错:错误:0308010C:数字信封例程::不支持
遇到了同样的问题.使用 Node 17.x,它有一个更新的 openssl,这是一个突破性的变化.
Had the same problem. Using Node 17.x and it has an updated openssl that is a a breaking change.
这对我有用,因为我使用的是纱线.
This worked for me because I'm using yarn.
export NODE_OPTIONS=--openssl-legacy-provider
您也可以尝试仅使用节点上的 --openssl-legacy-provider
开关.
You could also try just using the --openssl-legacy-provider
switch on node.