question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

truffle-hdwallet-provider error

See original GitHub issue
  • I’ve asked for help in the Truffle Gitter before filing this issue. code:
const Web3 = require('web3');
const {interface, bytecode} = require('./compile');
const HDWalletProvider = require('truffle-hdwallet-provider');
const mnemonic = "salmon ***"; // 12 word mnemonic
const provider = new HDWalletProvider(mnemonic,
    "https://rinkeby.infura.io/v3/***");
const web3 = new Web3(provider);

deploy = async ()=>{
     const accounts = await web3.eth.getAccounts();
     console.log(accounts[0]);
}
deploy();

Issue

node deploy.js
(node:13036) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'map' of undefined
    at GetAccountsMethod.afterExecution (H:\\SmartContracts\Index\node_modules\web3-core-method\dist\web3-core-metho
d.cjs.js:762:23)
    at GetAccountsMethod._callee$ (H:\SmartContracts\Index\node_modules\web3-core-method\dist\web3-core-method.cjs.
js:457:39)
...
...
...
TypeError: e is not a function
    at H:\SmartContracts\Index\node_modules\truffle-hdwallet-provider\dist\index.js:15:544968
    at H:\SmartContracts\Index\node_modules\truffle-hdwallet-provider\dist\index.js:1:150953
    at d (H:\SmartContracts\Index\node_modules\truffle-hdwallet-provider\dist\index.js:1:215490)
    at H:\SmartContracts\Index\node_modules\truffle-hdwallet-provider\dist\index.js:1:215543

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
CruzMolinacommented, Mar 25, 2019

@chrischip currently we only guarantee compatibility betw truffle & web3 up to 1.0.0-beta.37. There were breaking changes implemented in beta.38 and up that we are currently trying to resolve.

0reactions
adityagupta29commented, Sep 15, 2022

You are a mental health saver. Thank you sir.

Well, I don’t know much about contributing, pull requests & more. If you can do a favor for me. Suggest to me how can I learn to contribute to different projects.

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm - I am facing problem in installing @truffle/hdwallet provider
All you need is git installed in your PC. If installed type this command in cmd git --version . If it returns any...
Read more >
HD-wallet-provider cannot be installed with npm #2711 - GitHub
When I'm in my project directory I'm using npm i @truffle/hdwallet-provider but I only receive errors "npm ERR! enoent This is related to...
Read more >
Error: Cannot find module 'truffle-hdwallet-provider'
Try installing @truffle/hdwallet-provider like this in the console (same location from where you're deploying):
Read more >
Truffle hdwallet provider installation issue
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...
Read more >
@truffle/hdwallet-provider - npm
@truffle/hdwallet-provider. TypeScript icon, indicating that this package has built-in type declarations. 2.1.4 • Public • Published 4 days ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found