I managed to run a personal test chain. I deploy the Sample contract and everything is ok. Transactions included. Now how can I run the dapp? I go to the local package folder inside www I open the index.html file but

I get the error : web3 is not defined

Where are the web libraries defined? inside the node? Am I running the node in a wrong way?

geth --identity "Computer" --genesis myChain/myChainGenesys.json --rpc --rpcport "8000" --rpccorsdomain "*" --datadir "myChain" --port "30303" --nodiscover --ipcapi "admin,db,eth,debug,miner,net,shh,txpool,personal,web3" --rpcapi "db,eth,net,web3" --autodag --networkid 666666666 --nat "any" --unlock 0 console

This works for mining and deployment, does it work to play with the deployed app?

is the app here?


thanks in advance

  • Show the source code of your index.html
    – niksmac
    Commented Apr 3, 2016 at 13:05
  • pastebin.com/yHC3uDp7 it is the very basic example you find in Mix IDE, I didn't touch anything. I deployed and maybe I simply don't know how to run it. No instructions around.
    – Max
    Commented Apr 3, 2016 at 16:06
  • deployment.js pastebin.com/knWYwfgk
    – Max
    Commented Apr 3, 2016 at 16:10
  • contract.sol pastebin.com/RAEmLwbE
    – Max
    Commented Apr 3, 2016 at 16:11
  • These 3 files are generated by mix ?
    – niksmac
    Commented Apr 4, 2016 at 3:25

1 Answer 1


You should have to install Web3.js before running your Dapp in Mix.

From here:



npm install web3


meteor add ethereum:web3

As Browser module


bower install web3


component install ethereum/web3.js

Include ethereum.min.js in your html file. (not required for the meteor package)

  • Thanks for the hint, this helps. But I want to run the dapp with the browser. The dapp works perfectly inside Mix. I need to run it with the browser. The error I get comes from the browser. sorry I explained myself in a bad way. I have geth + html/js + deployed-dapp. I want to go there with the browser. Isn't possible? How can a final user visit my web3 html page? do they have to install other things? I would like them to visit with browser, with geth open in background.
    – Max
    Commented Apr 6, 2016 at 12:32
  • Web3 is the js client (the one you use to show your content in the browser). Geth is not needed for it. You just have to be sure that your browser app can use the web3 module. You can do it just making a truffle deploy in your server and that will deploy the contracts and the web app Commented Apr 6, 2016 at 13:19
  • At the moment I try to understand Meteor. I will have a look to truffle too. thanks for the infos. very precious. do you know any example of dapp made with truffle?
    – Max
    Commented Apr 7, 2016 at 8:12
  • When you do truffle init you get an example dapp :) Commented Apr 7, 2016 at 8:25
  • Find the official documentation of Truffle here : truffle.readthedocs.io/en/latest . Follow it and you will get a running Dapp example. @Max
    – Aniket
    Commented Aug 10, 2016 at 10:34

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.