Truffle hdwallet provider installation issue

Hi All,

I was going through the Chainlink course and as part of the unboxing of truffle we’re required to install dependencies.
I’m getting an error when trying to install the truffle hdwallet provider module. I’ve tried installing it independently with the following command as found on google:

npm install @truffle/hdwallet-provider

The error is relates to this specific command that is run as part of the installation:
command git clone ssh://[email protected]/ethereumjs/ethereumjs-abi.git
And after doing some googling it seems to be related to having access to this specific repo since the access is done via ssh. I added an ssh key to my github profile following the instructions found on github (https://docs.github.com/en/github/authenticating-to-github/adding-a-new-ssh-key-to-your-github-account) however the issue persists.

Has anyone run into this issue? Any ideas?

Thanks!

1 Like

Here is the full error I receive:

npm ERR! code 128
npm ERR! command failed
npm ERR! command git ls-remote ssh://[email protected]/ethereumjs/ethereumjs-abi.git
npm ERR! [email protected]: Permission denied (publickey).
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Mariano Collarte\AppData\Local\npm-cache\_logs\2021-05-08T15_19_33_234Z-debug.log
1 Like

Hey @Mariano_Collarte, hope you are well.

Try with this one instead:

https://github.com/trufflesuite/truffle-hdwallet-provider
Although that repo is deprecated, you should check in your node_modules folder if you have any folder with name hdwallet-provider.

Truffle migrate all his plugin into the truffle package, so basically when you install truffle, you should have the module hdwalet-provider installed already.

https://github.com/trufflesuite/truffle/tree/develop/packages/hdwallet-provider

If you have that folder already installed, then you can just follow the instructions from the deprecated repo, that way you can use custom seeds in your truffle environment.

Hope it helps, if not, let me know to find another way :nerd_face:

Carlos Z

Hey Carlos!

Thanks for the reply!
Unfortunately, when I run npm install in my project folder, after some processing I get that error and no node_modules folder is created in my project.
I was weirdly able to resolve these issues by installing each dependency in the json file:

  "dependencies": {
    "@chainlink/contracts": "^0.1.7",
    "@openzeppelin/contracts": "^3.4.0",
    "@truffle/hdwallet-provider": "^1.2.1",
    "dotenv": "^8.2.0"
  },

At the initial directory of the Git Bash: C:\Users\Mariano Collarte

Weirdly, that did not throw an error and after installing each of the 4 dependencies that way truffle compiled and migrated OK.

Any thoughts on why this might have worked?

Thanks!

1 Like

Thats weird, if you have a package-lock.json it will not let you update any package, unless you use npm install -f to force the installation of the packages.

Also you should not modify manually the dependecies, might be that your console does not have permissions to install packages ( try with admin).

Still if you fix it, you should be able to continue.

Carlos Z

Hey Carlos,

Thanks for the response!
After extensive trying, I opened an issue request to the github repo for the chainlink truffle box:
https://github.com/smartcontractkit/truffle-starter-kit

And they suggested I do the npm install with yarn which worked:
https://github.com/smartcontractkit/truffle-starter-kit/issues/96

I had an issue with the timeout connection but ran a command adjusting the timeout and it worked.

Just wanted to share for future reference.

Thanks

1 Like