Kel*_*IOT 17 ethereum chainlink hardhat
我从事 Hardhat 项目已经有一段时间了。
一段时间后,当我运行
npx hardhat node
启动 HH 服务器时,出现以下错误:
我尝试研究该错误并在安全帽网站上找到了这个
HH12: Hardhat is not installed or installed globally
You tried to run Hardhat from a global installation or not installing it at all. This is not supported.
Please install Hardhat locally using npm or Yarn, and try again.
Run Code Online (Sandbox Code Playgroud)
有趣的是,我创建了一个新的 HH 项目并重新安装了所有内容
,然后将我的代码导入到新项目中,这似乎解决了问题......
但过了一段时间,问题又开始了。
我不能每次发生这种情况时都创建一个新项目。
我已经被困了好几天了,非常感谢任何帮助。
操作系统:windows10
小智 13
不要全局安装 Hardhat。如果您已经全局安装了hardhat,请卸载,因为问题可能是由于错误消息中提到的原因造成的。
为了缓解这种情况,您需要做的事情:
npm install --save-dev hardhat
或yarn add --dev hardhat
npm install
或yarn install
安装所有依赖项。npx hardhat compile
或npx hardhat node
检查它是否有效。 归档时间: |
|
查看次数: |
28421 次 |
最近记录: |