I am trying to deploy a contract to Ropsten using Infura with the config file truffle.js below. The deploy fails because the account listed in the error message has insufficient funds – however I do not recognise the account given. It does not appear in the top 15 accounts associated with my mnemonic (e.g. using MyEtherWallet). I am inserting my mnemonic in the format word word word word.

The actual account 0 associated with my mnemonic has ample Ether from the faucet.

This still does not work. I changed your line console.log(a) to console.log(accounts) and it shows a different list of accounts each time. However, the Account listed by Truffle as the deploying account with no funds remains the same, and is unrelated to the private key. I am using MetaMask to extract the private key. Any other ideas?
– user77510Mar 11 at 8:46

Either When you go for **console.log(accounts)** it will show all addresses that are generated so next time you know what address will be responsible for transaction and so you can fill that account with some ether. Or Instead of using **mnemonic** you can use private that can be extract from Metamask
– Kamal Kishor MehraMar 12 at 8:53

The trouble is, I don't have access to the addresses listed in the console. I have tried the mnemonic and private key approach, and the addresses that I see and fill with ether e.g. in Metamask, do not correspond with the addresses logged by Truffle.
– user77510Mar 12 at 12:35