-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uncaught ReferenceError: require is not defined #3037
Comments
try: var Web3 = require('web3'); The package name starts with a lower case |
@michaelsbradleyjr still the same |
@narayanshivansh49 are you using some front-end build tooling like webpack? Do you have a repository I can look at? |
Using of a bundler is required if you install it from NPM. The minified file can be found here on GitHub in the dist folder. |
@nivida The minified file in the What is the best way for me to generate a minified version of 1.2.4 that works? |
@myq I tried uploading <script src="https://uploads.codesandbox.io/uploads/user/68052bd8-43d7-466a-af1e-bb0ab2bd3a40/F6-W-web3.min.js"></script> It seems to work fine, i.e. in the browser console I can see there is indeed a global variable named |
@cgewecke fixed this in #3261, so cloning the repo and building the minified version should work. I'm not sure if the minified file in |
sir , i'm getting same problem
First Smart Contract |
var Web3 = require("Web3");
I have downloaded the web3 modules using npm but the above statement in my HTML code is still showing error
The text was updated successfully, but these errors were encountered: