-
Notifications
You must be signed in to change notification settings - Fork 127
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
Missing Yarn Packages When Building Image Offline #576
Comments
@spyr0-sec - I tested this locally on Can you confirm you're still seeing this? If not, can you give some additional information about the steps you took so I can try to replicate? |
Thanks for getting back to me @StephenHinck I can confirm I am seeing this when building from the main and v5.8.1 branches: Reverting back to v5.8.0 I can build the image with no error. |
Hey @StephenHinck Just as a heads up we are still experiencing this issue on the v5.9.0 pre-release branches. Apologies I assume its a fairly easy fix but I just don't understand enough about npm / yarn. I've tried downloading the packages manually (https://www.npmjs.com/package/@rollup/rollup-linux-x64-musl/v/4.13.2) but can't seem to work out how to add them to the cache as the files within the repo are all prefixed with hashes etc so I assume there is a pipeline / process that I'm not aware of. Thanks! |
@spyr0-sec, I understand. This must have something to do with our CI automation, so it's unlikely to "just fix itself," as we're likely missing some packages to pull for the yarn cache. My familiarity with NPM/yarn is similarly limited - we'll get this on the team's plate to look at, but I don't have a timeline presently. |
@spyr0-sec these packages are indeed missing from the cache. Long-term we can make sure these are included! Short-term, you should be able to fetch the missing packages over the internet when running While we can't fully troubleshoot your issue I suggest peeking at https://stackoverflow.com/questions/31763418/docker-build-has-no-network-but-docker-run-has for suggestions or leads. Edit: I totally missed that you are wanting to do offline builds (per the issue title) - apologies! Locally, you can modify
Then, running |
Appreciate your assistance on this, I was able to manually import the dependencies which satisfied that build step. Unfortunately I'm now seeing a new error:
Having zero knowledge of JS, I asked CoPilot which returned the following:
I assume when I performed a yarn build on my online machine, it was running a different version of JS than what the docker image has? If this is the case do you know what version it has and I will rerun with the same. |
@spyr0-sec You don't need to run When running |
Apologies this was an environmental issue again from our side (joys of an air-gapped environment!). We are now able to build images again, I'll keep this ticket open until the rollup packages hopefully get merged into the release. Thanks again for all your help on this! |
Description:
During the ui-builder process, step
[ui-builder 2/8] RUN yarn install
fails as the two following packages are missing:I assume this is because they are not in the yarn cache?
We have not encountered this issue when building images of previous releases.
Component(s) Affected:
Steps to Reproduce:
Expected Behavior:
Docker image builds with no error
Actual Behavior:
Docker build fails with error as seen above.
Screenshots/Code Snippets/Sample Files:
If applicable, add screenshots, relevant code snippets, or sample files that help illustrate the issue.
Environment Information:
BloodHound: v5.8.1
Collector: N/A
OS: Ubuntu 22.04
Browser (if UI related): N/A
Node.js (if UI related: N/A
Go (if API related): N/A
Database (if persistence related): N/A
Docker (if using Docker): v25.0.1
Additional Information:
Package info - https://socket.dev/npm/package/@rollup/rollup-linux-x64-musl
Potential Solution (Optional):
I have tried to download the zip and add it to the cache manually but that does not seem to work. Sorry I do not understand Yarn enough to investigate further. Each of the zips in the .yarn/cache folder also seem to be suffixed with GUIDs so assume they are locked somehow?
Related Issues:
N/A
Contributor Checklist:
The text was updated successfully, but these errors were encountered: