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

Solve intermittent node_modules/web3/dist/web3.min.js (No such file or directory) #2937

Closed
oskarth opened this issue Jan 6, 2018 · 8 comments
Assignees
Labels

Comments

@oskarth
Copy link
Contributor

oskarth commented Jan 6, 2018

User Story

As a developer, I want to have a reliable build process so I can focus on gettin work done.

Description

Type: Bug

Summary: Fix build scripts and instructions so that node_modules/web3/dist/web3.min.js is always present.

Expected behavior

node_modules/web3/dist/web3.min.js (and more broadly, node_modules/web3/) should always be present when running npm install or equivalent.

Actual behavior

Reproduction

Caused by: java.io.FileNotFoundException: node_modules/web3/dist/web3.min.js (No such file or directory) and web3 isn't installed.

Additional information

This bug leads to hacks like https://github.com/status-im/status-react/blob/develop/Jenkinsfile.nightly#L8-L17, as well as countless questions and time wasted for people on Riot / core contributors.

Possible leads: web3/web3.js#1041 as well as moving to yarn.

@status-open-bounty
Copy link

status-open-bounty commented Jan 9, 2018

Current balance: 0.000000 ETH
Tokens: SNT: 250.00
Contract address: 0xc21c7737d9498f82d200825445d3fc6421edeaf3
QR Code
Network: Mainnet
To claim this bounty sign up at https://openbounty.status.im and make sure to update your Ethereum address in My Payment Details so that the bounty is correctly allocated.
To fund it, send ETH or ERC20/ERC223 tokens to the contract address.

@v2nek
Copy link
Contributor

v2nek commented Jan 9, 2018

This was solved by #2877

@andytudhope
Copy link
Contributor

Ah, gahd damn. Have just funded it as well... OK then, will work to undo it manually, thanks @v2nek

@oskarth
Copy link
Contributor Author

oskarth commented Jan 9, 2018

@v2nek This is not a solution, it's a hack to get around the root of the problem. See the additional information section in the issue.

@andytudhope Leave it be, please.

@stephengroat
Copy link

@oskarth yarn definitely work better than npm, but i think the real issue here is the use of the sh function while not checking the return code. you can exit on a non-zero return code, showing build failed. does anyone know what package the sh function is out of?

@oskarth
Copy link
Contributor Author

oskarth commented Jan 24, 2018

@stephengroat This can happen locally too though, so not just a Jenkins config issue. But I'm all for checking return codes. One can just wrap shell command in it and check return code I think. Here are some docs https://jenkins.io/doc/pipeline/steps/workflow-durable-task-step/#code-sh-code-shell-script

@stephengroat
Copy link

even though Jenkins sets the -e flag in its sh command, e is ignored in bash loops. i've run into it before, makes debugging impossible

since yarn can interpret package.json and seems to run a lot smoother, i'd try installing it locally on the jenkins boxes and switching out npm for yarn in all of the scripts. might help some. i'd make a pr, but since the jenkins boxes seem locally configured, i don't know if it would help too much

@rachelhamlin rachelhamlin added this to the Build Status Installation Fixes milestone Jun 27, 2018
@alwx
Copy link
Contributor

alwx commented Jul 24, 2018

Already fixed: #4974

@alwx alwx closed this as completed Jul 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants