(reply to: Deploy contracts to a public network)
Can you check your
package.json to see that you have
Otherwise please install:
$ npm install --save-dev @truffle/hdwallet-provider
I have tried and this time a different Error “unexpected token” coming please see attached image…
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
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.
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.
Linux would be the best thing to use.
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
hdwallet-truffle-provider as it was still the “old” name instead of the current one:
const HDWalletProvider = require("truffle-hdwallet-provider");
const HDWalletProvider = require("@truffle/hdwallet-provider");
and everything is running again as expected
Hope this helps