-
Notifications
You must be signed in to change notification settings - Fork 530
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
with-vanilla-js example doesn't work because it has missing file #1664
Comments
@nickgreen5 the bundle.js file is not missing- it is automatically generated by webpack upon running |
@leightkt thank you but step run npm run build is not mentioned in the readme. It may be logical for those who use npm on daily basic but for us who never used npm before it it is critical that every required step is wrote down. I run now also this and it created folder dist (which hasn't been created by running only npm run dev), however there is still no bundle.js file inside, it created bunch of other files. Maybe it has something to do with Windows? Or is maybe any other missing step? |
@nickgreen5 It's not mentioned because |
@leightkt There is no error (see the image below). I just checked webpack.config.js file, I am not sure how it supposed to create bundle.js file if this name is not mentioned anywhere:
|
@nickgreen5 it's created by webpack for you under the hood when you run Please make sure you have webpack installed- https://webpack.js.org/guides/installation/ |
@leightkt sorry to be little annoying but I just tried the same thing on Ubuntu machine, followed the exact steps and again there is no bundle.js file. Also asked my friend and the same. There must be missing some step in instructions I guess for those who newly installed npm and webpack, I don't see any other explanation why following the exact steps on 3 different machines, including Ubuntu, didn't create bundle.js file. |
@nickgreen5 it's because webpack is serving bundle.js from memory when you run the dev server, so it's not something you're going to see listed in the files structure. It's there- behind the scenes. |
Ditto... Same happens for me too. 404 on the dist/bundle.js |
@Mallinanga Ok- thanks for the report- reopening re-examining! |
I managed to make it work by adding:
instead of the provided /dist/bundle.js |
@Mallinanga I was able to solve by running |
@Mallinanga Thx, that almost resolved my problem too. I needed to add also defer attribute to script tag. However now I get different error if I click WalletConnect button. Does it work for you? I get this error: |
@leightkt I appreciate all your help. However this didn't solve the problem on my side, still getting the same error. I thought that the purpose of vanilla js example was that you could simply include js files into html and run the example without running npm/nodejs. |
@nickgreen5 you'll need a module bundler- like webpack- to use the web3onboard package. It has a lot of complex dependencies and uses "bare" imports not supported in browser. |
@nickgreen5 I was able to reproduce the walletConnect error- I'll push some updates to the example |
@nickgreen5 I pushed some changes to the vanilla-js demo: Let me know if this gets you up and running! |
Merged in latest release! Feel free to continue the conversation here if an issue arises. |
Just wanted to write follow update for those who want to run this like really old school way pure js without nodejs. Do all the mentioned steps, then run
into
This did trick to me, now I can simply just copy all files to my php project. |
There is no bundle.js file and this file is included inside index.html. This is why the example doesn't work.
I did exact steps as mentioned in readme:
Still there is no bundle.js file that is included in index.html
<script defer src="dist/bundle.js"></script>
The text was updated successfully, but these errors were encountered: