1

My web3 version is 1.0.0-beta.41, node version is 10.15.1 solc compiler is 0.4.25

compile.js is successfully compiled with interface and bytecode exports.

My deploy.js file

const HDWalletProvider = require('truffle-hdwallet-provider');
const Web3 = require('web3');
const { interface, bytecode } = require('./compile');


const provider = new HDWalletProvider(
     "punch hello latin float quality thank armor shoulder quick daring tone tell",
    "https://rinkeby.infura.io/v3/c4683f6aea9f4e65a690b46d028dcc94"
 )

const web3 = new Web3(provider);

When i do

 node deploy.js 

I get this following error

          Error: Please provide an valid Web3 provider
        at ProviderResolver.resolve (/home/feynman/Programs/Ethereum/Ethmarket/node_modules/web3-providers/dist/web3-providers.cjs.js:720:13)
        at Web3.AbstractWeb3Module (/home/feynman/Programs/Ethereum/Ethmarket/node_modules/web3-core/dist/web3-core.cjs.js:27:51)
        at new Web3 (/home/feynman/Programs/Ethereum/Ethmarket/node_modules/web3/dist/web3.cjs.js:30:68)
        at Object.<anonymous> (/home/feynman/Programs/Ethereum/Ethmarket/deploy.js:11:14)
        at Module._compile (internal/modules/cjs/loader.js:689:30)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
        at Module.load (internal/modules/cjs/loader.js:599:32)
        at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
        at Function.Module._load (internal/modules/cjs/loader.js:530:3)
        at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
        at startup (internal/bootstrap/node.js:283:19)
        at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)
0

tuffle-hdwallet-provider is deprecated check out the versions compatibility

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.