I synced all ethereum nodes in my localhost and I am connecting my node through this command

geth --rpc --rpcaddr "" --rpcport "8545" \ --rpc --rpccorsdomain "" console

and then I am attaching thought this command from node.js cmd

geth attach 

then I download web3.js and make one Html page for testing so before I create an account through (geth account new ) from node.js cmd and when and after that I am using some script for checking my create account that is I create thought node.js cmd using (geth account new ) its show perfectly and now i want to create new etherum account using

var Accounts = require('web3-eth-accounts');

// Passing in the eth or web3 package is necessary to allow retrieving chainId, gasPrice and nonce automatically
// for accounts.signTransaction().
var accounts = new Accounts('ws://localhost:8546');

so its showing me error that is

web3-eth-accounts is not found

but you give me the solution for this using this command(npm install web3-eth-accounts ) so it successfully install but when i run this (npm run-script build-all) so it's not working my node.js cmd and tell me where I had to run this command in the project ?.

and I am also facing this issue

npm install
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

audited 118883 packages in 29.686s
found 1766 vulnerabilities (1 low, 1765 moderate)
  run `npm audit fix` to fix them, or `npm audit` for details
  • 1
    Based on some discussion in other threads, you mentioned you are trying to create an Ethereum account to be used in Web3.js. Is there a reason you are trying to do this programmatically versus using a wallet like MetaMask? This is the standard practice, and makes it really easy to set up a Web3.js front-end. Try looking at this hello world tutorial. Commented Aug 29, 2018 at 2:44
  • getting balance is working fine but when i am trying to create the new account through html page its giving me error Commented Aug 29, 2018 at 18:10
  • can we create etherum account using html page like we are using html page for checking balance using some scripts Commented Aug 29, 2018 at 18:13
  • You can, but I think that is the wrong practice. You should be letting another service like MetaMask create the accounts for the user. Can you tell me why YOU want to create an account using an HTML page? Commented Aug 29, 2018 at 18:47
  • because i want to make web wallet where i can able to send coin ethereum to ethereum Commented Aug 30, 2018 at 5:54

2 Answers 2


Follow the installation instructions for web3-eth-accounts:




npm install web3-eth-accounts

In the Browser

Build running the following in the web3.js repository:

npm run-script build-all

Then include dist/web3-eth-accounts.js in your html file. This will expose the Web3EthAccounts object on the window object.

  • E:\btc1\web3.js-develop>npm run-script build-all npm ERR! missing script: build-all npm ERR! npm ERR! Did you mean this? npm ERR! build Commented Aug 28, 2018 at 20:38
  • What are you trying to do? What are you starting with? Are you using Node.js or are you building a basic HTML/JS page? You can't just paste error messages at us. Update your main post to include more details for better advice. Commented Aug 28, 2018 at 20:49
  • npm run-script build-all when i am try to install this i face issue in my web3 project help me Commented Aug 28, 2018 at 21:37
  • 1
    The error message for the NPM error says missing script: build-all. Most probably, there is no build-all script defined in the package.json file Commented Aug 28, 2018 at 23:28
  • @AjoyBhatia could you tell how to add it? Commented Sep 10, 2018 at 15:55

Installing web3-eth-accounts will probably not give a successful build because some other NodeJS module dependency may be missing. So, first execute the following command:

npm install

This takes the list of required dependencies from the package.json file and installs them all.

Also, I looked at the package.json file at https://github.com/ethereum/web3.js/blob/develop/package.json and I don't see a script named build-all defined in it. Look at the "scripts" JSON object in this file. The only scripts you can run (with the command: npm run-script <script-name>) are build, watch, lint, test and test-coveralls. What you want to run is, probably, the following:

npm run-script build

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.