I'm testing the web3 api, but it seems to be an error when I try require('web3').

Require.js indicates that there is an error inside web3.js, but I have the latest release of web3. Maybe I have a wrong use of it. Can you help me ?

You can find bellow my code and the error:


  • Can you just try var web3 = require('web3');?
    – Loi.Luu
    Apr 4, 2016 at 3:22

1 Answer 1


The error comes from the given path to web3.js. you are using src="../Desktop/Blockchain.....

to resolve that put the script web3.js in the same folder that your page HTML 'page1.html" .

Your Answer

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

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