I've installed [email protected] with npm install.
I copied the file node_modules/web3/dist/web3.min.js into my web app.
I'm loading the file with:
<script type="text/javascript" src="js/web3.min.js"></script>
In the browser console (Chrome 70+), I see this error:
Uncaught ReferenceError: require is not defined
at web3.js:1
Thanks for opening this issue! The minified file here provided in the GitHub repository does work as expected but the published one in the web3 package not. We will publish a new fixed minified file on the next patch release. I apologize for all the trouble you might have.
v1.2.2 is ok without this error.
@nivida Where is the minified file? The one in the ZIP archive https://github.com/ethereum/web3.js/releases/tag/v1.2.4 has the same problem.
v1.2.2 works for me.
@digulla Thanks for asking this! The minified file can be found here.
@nivida Still getting the same error with the file at your link.
sha256 of the file:
42037f35ccf2195cdd80448f4963515dd8c6a2d7b416f042743c1d4cec7fc17d web3.min.js
Most helpful comment
v1.2.2 is ok without this error.