npm - 无法为 Hardhat 项目安装软件包
问题描述
我想使用 Hardhat 环境创建一个项目。我已经尝试从他们身边遵循https://hardhat.org/getting-started/教程。在那里,我们有一个提示来安装所有必需的软件包。不幸的是,当我npm install --save-dev @nomiclabs/hardhat-waffle ethereum-waffle chai @nomiclabs/hardhat-ethers ethers
第一次运行时,我可以看到很多关于已弃用软件包的警告,然后
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno -4058
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t https://github.com/ethereumjs/ethereumjs-abi.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\(path)
我试过安装ethereum-waffle
选择的特定版本等。它总是以同样的错误结束。
你知道如何克服它吗?为什么在安装过程中不推荐使用这么多软件包?这是getting-started
过时的,我应该以其他方式开始安全帽项目吗?
解决方案
推荐阅读
- python - 无法从 S3 获取 csv 并使用 Python 进行转换
- vue.js - vue.js 中的数组属性
- reactjs - 如何防止 Material UI Dialog 在单击背景时被关闭?
- python - 安装 matplotlib 时 pip install 命令错误,退出状态为 1
- ios - App Store Connect 操作错误:“无效的 AdamId”
- rabbitmq - 将消息发布到特定的客户端 ID
- angular - 我怎样才能改变 NbDialogService 的大小?
- sql - 使用一个选择查询而不是查询+子查询
- tensorflow - 如何在 Tensorflow version='2.0.0' 中保存和加载 tf.estimator.BoostedTreesRegressor 的模型
- java - Spring JMS 无法连接到 JBoss EAP 7.1 ActiveMq Artemis