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:
- Created 5 years ago
- Reactions:3
- Comments:7 (3 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@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.
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.