Creating an account with web3.js v0.2.6

0 votes

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?

Oct 9, 2018 in Blockchain by digger
• 27,630 points
39 views

1 answer to this question.

0 votes

The answer is

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

Hope this helps..

answered Oct 9, 2018 by Omkar
• 67,380 points

Related Questions In Blockchain

+1 vote
1 answer

Getting issues while Sending signTransaction with web3.js

The chain ID for ropsten is 3. ...READ MORE

answered Mar 28, 2018 in Blockchain by Johnathon
• 9,080 points
434 views
0 votes
1 answer
0 votes
1 answer

Call contract methods with web3 from newly created account

In fact, we can't just send transactions ...READ MORE

answered Sep 25, 2018 in Blockchain by digger
• 27,630 points
793 views
0 votes
1 answer

Can I swap an ERC-20 token with a Neo NEP5 token using a smart contract?

Every Blockchain has a separate administration. So, it ...READ MORE

answered Jun 4, 2018 in Blockchain by Perry
• 17,020 points
84 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
138 views
0 votes
1 answer
0 votes
1 answer

Solidity geth: Error encountered during contract execution [Bad instruction]

recipes is a dynamic storage array. You need ...READ MORE

answered Oct 15, 2018 in Blockchain by Omkar
• 67,380 points
75 views
0 votes
2 answers

How do I interact with a smart contract on a private network through web3.js

I found a blog that explains how ...READ MORE

answered Aug 20, 2018 in Blockchain by slayer
• 29,050 points
295 views
0 votes
1 answer