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

Addition of swarm-js causes webpack builds to fail #923

Closed
christopherdro opened this issue Jul 13, 2017 · 5 comments
Closed

Addition of swarm-js causes webpack builds to fail #923

christopherdro opened this issue Jul 13, 2017 · 5 comments

Comments

@christopherdro
Copy link

The addition of the swarm-js library on branch 1.0 introduced issues on client side apps that may be using webpack.

Module not found: Can't resolve 'child_process' in '/Users/christopherdro/Desktop/sample-app/node_modules/web3/packages/web3-bzz/node_modules/swarm-js/lib'
/cc @MaiaVictor

@stevendkwtz
Copy link

stevendkwtz commented Jul 25, 2017

Any resolution to this? Getting the error as well.

EDIT: pre 1.0 works, so you can downgrade to 0.19.0 for now.

@apraka16
Copy link

apraka16 commented Jul 26, 2017

Same issue this side. pre 1.0 works.

VictorTaelin added a commit that referenced this issue Jul 26, 2017
I'm assuming the problem happened when web3 was imported with require, and
then webpack was used on it. If so, this was probably caused because I was
incorrectly importing Node.js related libs on the browser release. This
fixes it by correctly using the browser field on package.json.
@VictorTaelin
Copy link
Contributor

Sorry, I didn't see this before. This commit should fix it.

VictorTaelin added a commit that referenced this issue Jul 27, 2017
Includes the swapping of the mimetypes library on swarm-js, which fixes another
issue with webpack.
@christopherdro
Copy link
Author

fd2a947

@bellaj
Copy link

bellaj commented Aug 1, 2017

npm install web3@0.19

nachomazzara pushed a commit to nachomazzara/web3.js that referenced this issue Jun 4, 2020
I'm assuming the problem happened when web3 was imported with require, and
then webpack was used on it. If so, this was probably caused because I was
incorrectly importing Node.js related libs on the browser release. This
fixes it by correctly using the browser field on package.json.
nachomazzara pushed a commit to nachomazzara/web3.js that referenced this issue Jun 4, 2020
Includes the swapping of the mimetypes library on swarm-js, which fixes another
issue with webpack.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants