0

so everytime i try to create an account with web3 i always get errors like the wrong version of web3 and that i should switch to v1.0.0

i used this command to install web3

  npm install ethereum/web3.js --save

i ve tried these commands to create an account but there is always a mismatch

  web3.eth.accounts.create();
web3.eth.personal.newAccount('!@superpassword')
.then(console.log);

and i always get errors even though i installed

npm install web3-eth-account --save 
npm install web3-eth-personal --save

can anyone help me?

Az Emna
  • 527
  • 2
  • 10
  • 26

1 Answers1

1

the answer is

let a=web3.personal.newAccount('!@superpassword')
Az Emna
  • 527
  • 2
  • 10
  • 26
  • web3.js < v1.0 does not have the object `web3.personal`. See https://github.com/ethereum/wiki/wiki/JavaScript-API document. – Alireza Zojaji Nov 24 '18 at 23:29