(reply to: Deploy contracts to a public network)
When try to migrate $ npx truffle migrate --network mainnet!
Error: Cannot find module 'truffle-hdwallet-provider @abcoathup
Untitled|685x500
(reply to: Deploy contracts to a public network)
When try to migrate $ npx truffle migrate --network mainnet!
Error: Cannot find module 'truffle-hdwallet-provider @abcoathup
Untitled|685x500
Hi @Rahaman,
Can you check your package.json
to see that you have @truffle/hdwallet-provider
installed?
Otherwise please install:
$ npm install --save-dev @truffle/hdwallet-provider
Thanks @abcoathup
I have tried and this time a different Error “unexpected token” coming please see attached image…
Hi @Rahaman,
It looks like your truffle-config.js
is malformed and you have a curly bracket in the wrong place.
Not understand, sorry. Please explain me.@abcoathup
I think truffle/hdwallet-provider is not installing on my PC.@abcoathup
Hi @Rahaman,
Are you able to upgrade to Windows 10? You could then run Windows Subsystem for Linux. Solidity Smart Contract development on Windows
Developing smart contracts on native Windows can be problematic as not all projects work/test on Windows. In 2017/18 I was developing on Windows 7 and used to run into problems regularly. I have a much easier time using WSL.
You could try creating an issue for @truffle/hdwallet-provider
installation on Windows.
Hi @abcoathup
I was installed few month ago, but my PC was run very slowly, then i was change. can i install others OS to good for deploying.
Hi @Rahaman,
Linux would be the best thing to use.
Hi
I ran into the same issue after I switched into a project that I’ve written and published exact a year ago. I wanted to execute some methods on a smart contract and got the same issue.
In my case, I had to change the require
-statement for hdwallet-truffle-provider
as it was still the “old” name instead of the current one:
I changed:
const HDWalletProvider = require("truffle-hdwallet-provider");
into
const HDWalletProvider = require("@truffle/hdwallet-provider");
and everything is running again as expected
Hope this helps
Best, itinance