Skip to content
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

Where is `dist` folder and `web3.min.js`? #1041

Closed
nyxynyx opened this issue Sep 14, 2017 · 30 comments

Comments

Projects
None yet
@nyxynyx
Copy link

commented Sep 14, 2017

After npm install --save web3, I only see packages and src foldesr inside node_modules/web3. Where is the dist folder containing web3.min.js?

@riteable

This comment has been minimized.

Copy link

commented Sep 15, 2017

Same issue here when installing with npm. No dist folder. Thought I'd try npm run build, but there's an error: "Local gulp not found in ...". While I do have gulp installed globally.

@riteable

This comment has been minimized.

Copy link

commented Sep 15, 2017

I should add that using import Web3 from 'web3' (in Nuxt.js) gives an error for missing dependencies:

These dependencies were not found:

* eth-lib/lib/hash in ./node_modules/web3/packages/web3-utils/src/utils.js
* ethjs-unit in ./node_modules/web3/packages/web3-utils/src/index.js
* number-to-bn in ./node_modules/web3/packages/web3-utils/src/utils.js
* randomhex in ./node_modules/web3/packages/web3-utils/src/index.js
* swarm-js in ./node_modules/web3/packages/web3-bzz/src/index.js
* underscore in ./node_modules/web3/packages/web3-bzz/src/index.js, ./node_modules/web3/packages/web3-eth/src/index.js and 4 others
* web3-core in ./node_modules/web3/packages/web3-eth-personal/src/index.js, ./node_modules/web3/packages/web3-eth/src/index.js and 2 others
* web3-core-helpers in ./node_modules/web3/packages/web3-core/src/extend.js, ./node_modules/web3/packages/web3-eth-personal/src/index.js and 1 other
* web3-core-method in ./node_modules/web3/packages/web3-core/src/extend.js, ./node_modules/web3/packages/web3-eth-personal/src/index.js and 3 others
* web3-core-requestmanager in ./node_modules/web3/packages/web3-core/src/index.js
* web3-core-subscriptions in ./node_modules/web3/packages/web3-eth/src/index.js, ./node_modules/web3/packages/web3-shh/src/index.js
* web3-eth-abi in ./node_modules/web3/packages/web3-eth/src/index.js
* web3-eth-accounts in ./node_modules/web3/packages/web3-eth/src/index.js
* web3-eth-contract in ./node_modules/web3/packages/web3-eth/src/index.js
* web3-eth-iban in ./node_modules/web3/packages/web3-eth/src/index.js
* web3-eth-personal in ./node_modules/web3/packages/web3-eth/src/index.js
* web3-net in ./node_modules/web3/packages/web3-eth-personal/src/index.js, ./node_modules/web3/packages/web3-eth/src/index.js and 1 other
* web3-utils in ./node_modules/web3/packages/web3-core/src/extend.js, ./node_modules/web3/packages/web3-eth-personal/src/index.js and 2 others

To install them, you can run: npm install --save eth-lib/lib/hash ethjs-unit number-to-bn randomhex swarm-js underscore web3-core web3-core-helpers web3-core-method web3-core-requestmanager web3-core-subscriptions web3-eth-abi web3-eth-accounts web3-eth-contract web3-eth-iban web3-eth-personal web3-net web3-utils
@frozeman

This comment has been minimized.

Copy link
Member

commented Sep 21, 2017

@riteable npm run-script build should work. And why is it not installing those dependencies? They are in the package.json and testing it locally works. Can you give more information?

@ghost

This comment has been minimized.

Copy link

commented Sep 23, 2017

I also have this issue: no dist folder after running npm install web3 --save.

My mac has node v8.5.0 and npm v5.4.2.

Thanks in advance for any insight!

@okwme

This comment has been minimized.

Copy link

commented Sep 25, 2017

after running npm install web3@1.0.0-beta2 --save i'm missing utils functions.

i went into /node_modules/web3/ and ran npm install and npm run-script build but i get the install error:
Error: Cannot find module 'web3-core' from '[my_project_path]/node_modules/web3/packages/web3-net/src'

@riteable

This comment has been minimized.

Copy link

commented Oct 2, 2017

@frozeman Now it seems to install even less files than previously. When I npm install web3 and view my node_modules/web3 directory there's only a src directory, and package.json and README.md files. I assume there should be a lot more there, like dist, packages, lib directories, etc.

Also, package.json doesn't have a scripts field where the build command is defined, so npm run-script build will not work inside the web3 directory.

This happens using OS X and web3@1.0.0-beta.22. Later today I will test on Ubuntu and report back.

@wrisx

This comment has been minimized.

Copy link

commented Oct 8, 2017

Same problem here

@anaamnizami

This comment has been minimized.

Copy link

commented Oct 9, 2017

I am facing the same issue on Ubuntu. Has anyone figured out the solution?

@anaamnizami

This comment has been minimized.

Copy link

commented Oct 10, 2017

@nyxynyx hey so basically along with npm install web3 you also need "npm install ethereum/web3.js" . This worked for me

@byjg

This comment has been minimized.

Copy link

commented Nov 17, 2017

If you wanna create the dist/web3.js you'll have to do this directly from the source code.

git clone git@github.com:ethereum/web3.js
git checkout 1.0
npm install
npm run-script build
@adibas03

This comment has been minimized.

Copy link

commented Dec 4, 2017

What worked for me.
If web.0.x.x ,
import 'web3/index'

@Aliasgharmohammad

This comment has been minimized.

Copy link

commented Feb 9, 2018

hi guys i solved this issue by downloading the offline package from https://codeload.github.com/ethereum/web3.js/zip/develop and unzipped dist part from it and moved it to the directory where web3 was installed and added where it must be .

@k06a

This comment has been minimized.

Copy link

commented Mar 8, 2018

Just discovered tag 1.0. Here is always actual latest dist: https://github.com/ethereum/web3.js/blob/1.0/dist/web3.min.js

gasolin added a commit to gasolin/web3.js that referenced this issue Apr 21, 2018

gasolin added a commit to gasolin/web3.js that referenced this issue Apr 21, 2018

@gasolin

This comment has been minimized.

Copy link

commented Apr 21, 2018

Since web3 1.x package is published via packages/web3 and dist/ is not there.
I made a patch at #1336 to put the dist/web3.min.js to the right place.

@yidongw

This comment has been minimized.

Copy link

commented Jul 4, 2018

@k06a Thanks so much. It was really difficult to find the 1.0 version

@masterial

This comment has been minimized.

Copy link

commented Jul 22, 2018

I have this problem. >:(

@frozeman

This comment has been minimized.

Copy link
Member

commented Jul 22, 2018

The dist folder is in the 1.0 branch: https://github.com/ethereum/web3.js/tree/1.0/dist

@nivida nivida closed this Aug 9, 2018

@igormuba

This comment has been minimized.

Copy link

commented Feb 1, 2019

still have this problem, isn't there any alternative to web3 to work with Ethereum?!?!

@gfijrb

This comment has been minimized.

Copy link

commented Feb 4, 2019

Of coursce if you need 1.x.x version just use /dist/web3.esm.js, minify it use Free Online Javascript Minifier

@gfijrb

This comment has been minimized.

Copy link

commented Feb 4, 2019

still have this problem, isn't there any alternative to web3 to work with Ethereum?!?!

Use this library ethers.js, wrapper for web3

@1559012

This comment has been minimized.

Copy link

commented Mar 4, 2019

npm install web3@0.20.6 --save
this works for me :))

@oberstet

This comment has been minimized.

Copy link

commented Mar 8, 2019

npm install ethereum/web3.js did work for me (I get a distfolder with web3.min.js) - NOT npm install web3

@mcplums

This comment has been minimized.

Copy link

commented Mar 28, 2019

I tried npm install ethereum/web3.js and did NOT get a dist folder with web3.min.js... the links above with the online version of this file are all 404ing

@Jorocha

This comment has been minimized.

Copy link

commented Mar 29, 2019

web3@0.20.6 --save

Thanks! This works for me too!

@1559012

This comment has been minimized.

Copy link

commented Mar 29, 2019

Because this is the old web3 version. So read the Javascript API document instead of web3 official website

@AndreGidoin

This comment has been minimized.

Copy link

commented Apr 22, 2019

Why isn't the dist folder with the most up to date web3.js file just added here? It makes it really hard to understand what's wrong and where to find the right files needed.

@1559012

This comment has been minimized.

Copy link

commented May 11, 2019

web3@0.20.6 --save

Thanks! This works for me too!

I also found another solution for installing web3js 1.0.0 by following those command :

  1. uninstall / reinstall node (deleted all related folders in local directories too, including in Roaming)
  2. in POWERSHELL as Administrator: npm install --global --production windows-build-tools
  3. npm install --save --no-optional web3.

Hope this help you catch up with the lastest version of web3.

@JesseBusman

This comment has been minimized.

Copy link

commented Jun 18, 2019

I'm having this problem, nothing mentioned here has helped me get a web3.min.js.

@AdaptiveGitHuber

This comment has been minimized.

Copy link

commented Jun 19, 2019

@1559012
Your solution really helps. In my case, in Windows 10, nothing worked until I UNINSTALL the nodes first:
npm uninstall -g web3

Then

install the build tools and reinstall web3 as in steps 2. and 3. @1559012
Thank you so much!

@andy0130tw

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.