且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

我在安装 @truffle/hdwallet provider 时遇到问题

更新时间:2023-01-23 17:58:52

我刚刚遇到了几个问题.

我设法解决了它.

你只需要在你的 PC 上安装 git

如果已安装,请在 cmd 'git --version' 中键入此命令如果它返回任何版本,你就很好

进入系统环境变量设置->系统变量->路径->粘贴你的git路径你的git路径->C->程序文件->git->bin->点击顶部的地址栏并复制路径然后粘贴到上面的过程中

现在应用设置,然后重启你的电脑

现在打开 cmd 并输入 git--version

你可以走了.

快乐编程:-)

PS C:\Coding\blockchain-toolkit> npm i @truffle/hdwallet-provider
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno ENOENT
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t
https://github.com/trufflesuite/provider-engine.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

Below are the details of my environment:

  • Operating System: Ethereum client:

  • Truffle version (v.5.1.4):

  • node version (v12.14.0):

  • npm version (6.13.4):

All these are the latest versions.

How can I solve this problem?

I had several problem just.

I managed to solve it.

All you need is git installed in your PC

If installed type this command in cmd 'git --version' If it returns any version you are good else

go to system environment variables settings-> System variables-> Path-> paste your git path Your git path -> C->program files->git->bin->click on address bar on top and copy the path and then paste in above process

Now apply the settings and then restart your PC

Now open cmd and type git--version

You are good to go.

happy programming:-)