错误 HH604:运行 JSON-RPC 服务器时出错:错误:0308010C:数字信封例程::不支持 [英] Error HH604: Error running JSON-RPC server: error:0308010C:digital envelope routines::unsupported

查看:33
本文介绍了错误 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.

这篇关于错误 HH604:运行 JSON-RPC 服务器时出错:错误:0308010C:数字信封例程::不支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆