Az Emna
Az Emna

Reputation: 535

Create an account with web3.js v0.2.6

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?

Upvotes: 0

Views: 229

Answers (1)

Az Emna
Az Emna

Reputation: 535

the answer is

let a=web3.personal.newAccount('!@superpassword')

Upvotes: 1

Related Questions