-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Support Bun: Running Bun Install in Docker gives The Cypress App could not be downloaded #28722
Comments
came here to say that I'm seeing the same thing with the same bun version 1.0.16 doesn't exhibit these issues with the same two cypress 13.6.x versions mentioned above. |
@ZachHandley I'm wondering if this is actually a bun issue perhaps. I had success in getting past this issue with using |
|
Unfortunately not, NPM worked fine, it usually makes it to 99% before failing and it usually seems like it's right around when it would begin executing an install script, so not sure. |
But also I just want to say, I have 0 issues with any other packages using Bun so far, so support it or don't but this is almost definitely on Cypress or some weird interaction that shouldn't be happening |
I can reproduce your error using the Bun Docker image oven/bun. This is an image based on Running the following in the Docker container:
then: bun add cypress -D
export DEBUG=cypress:*
bun cypress install showed the following debug log:
The error is:
Cypress provides compatible Docker images on the Docker Hub under cypress.
Please note that I am a community contributor not a Cypress.io employee, so I don't make statements on behalf of Cypress.io. Any statement about whether Cypress supports Bun or not would need to come from the Cypress.io team. The Cypress installation documentation lists npm, Yarn and pnpm as installation tools. There is no mention anywhere in the Cypress documentation about using Bun and so you can assume that Cypress is not regularly tested against Bun in Cypress' CI/CD process. |
The Docker image oven/bun does not include Node.js and this is required for a successful download of Cypress. The documentation Installing Cypress > System requirements > Node.js implies this, although it is not specific to say that one of npm, Yarn or pnpm is required. I can also reproduce this on Ubuntu with only Bun and no Node.js installed. So the issue is that Cypress cannot be installed without Node.js. This would be a separate enhancement request to allow Cypress to be installed and run in a pure Bun environment with no Node.js present. It's also possible that this issue is a Bun bug, since Bun is advertised as a drop-in replacement for Node.js. Edit: The Bun / Node.js compatibility page shows multiple gaps in Bun's compatibility with Node.js. Another enhancement request would be for Cypress Docker images to allow use with Bun. |
I used cypress/factory to build a Docker image and run Cypress using Bun.
It is not very elegant to have to use Node.js in parallel to Bun, and to install Bun with npm. This was just to show that it is possible. There is no claim that it is an optimal solution! docker build . -t test
docker run -it test bun cypress run
|
Adding a note to the docs about Node.js being required: cypress-io/cypress-documentation#5615 |
So my only issue with this is that Bun is meant to be a direct replacement of NPM. It quite literally works as a drop in replacement for me everywhere I go. Is there a specific thing that's causing this in Cypress? Bun has replacement features for almost everything, and it has node webserver and such built in, so can there be compatibility added? I'd be happy to peek at it. |
@ZachHandley agreed with your point. However, in my own mind that seems to give more credence to what I was saying in my prior comment, which is that this is actually a bun issue since 1.0.017. See the link in my prior comment to the GitHub issue in Bun’s repo. |
For the record, my Dockerfile is actually not based on Just trying to help InvoiceNinja out by dockerizing the application entirely with all deps |
With no Node.js installed, execute the following: bun init --yes
bun add cypress --save-dev --ignore-scripts
export DEBUG=cypress:*
bun cypress install This fails with
|
An Ubuntu base image would not normally have Node.js installed by default. In any case the environment to reproduce the issue is now clear (no Node.js installed) and it does not require Docker to reproduce. |
The Bun / Node.js compatibility page says:
Edit: I didn't see any Bun user reporting the compatibility issue with the Cypress postinstallation script, and since I had already done the work to reproduce the issue, I decided after all to report it to Bun myself. The comment (above) that Node.js is required still stands. |
|
This comment was marked as resolved.
This comment was marked as resolved.
In #28722 (comment) @jennifer-shehane clarified that Node.js is required to install Cypress and this is also now listed in the Cypress documentation under System requirements. At this time, Bun has implemented only a subset of Node.js as listed on Bun > Node.js compatibility. Attempting to download the Cypress binary fails with only Bun installed and no Node.js installed. This is the subject of this issue. It seems that the failure occurs when Cypress tries to verify the checksum of the downloaded |
Please re-test as it seems that bun has resolved this issue in bun v1.1.8 which was released on May 10, 2024. |
I tested yesterday both on windows and linux with bun v1.1.8 around 200 e2e tests with cypress. The UI is written with quasar dev framework (vue js based).
So from my point of view it works. |
|
Hi @MikeMcC399 , Seems like npm is still required, and this seems not a full support for cypress. Let me present you the Dockerfile I use:
|
|
I'm having issues with this as well:
Is |
|
Note that the Cypress Docker images provide all the prerequisites for installing and running Cypress in a Docker container. They are however configured with Node.js, so this is not a solution if the requirement is to run in an environment with no Node.js installed. |
@MikeMcC399 Funny enough, we're not trying to use a Cypress image. Our issue is related to Bun installing Cypress unintentionally for our main app containers. Even though Cypress is an optional/dev dependency, it's still being installed as part of the web app container. Thus, we just need to get through unzipping Cypress so it doesn't fail when building images needed for our internal servers. I know there's likely two issues going on there that need some more investigation but we just want to get this working in the meantime. However, this seemed to work:
I also looked at these images that bundle Bun and node together but we ran into separate issues there: https://github.com/ImBIOS/bun-node |
Thanks for confirming that adding I believe that it should be possible to close this issue now. |
In my container installing |
This should probably be denoted somewhere in the Cypress docs if it makes sense. |
You're free to make this suggestion in the https://github.com/cypress-io/cypress-documentation repo, however you should consider that Cypress does not support or document the use of Bun at this time. The Cypress documentation lists Node.js as a prerequisite in the System requirements section and this is sufficient to install Cypress without |
Returning to this. So, I got it to work locally with bun, but the cypress.io GH Action will not work with bun. There's no support in it for bun, so no matter what, this error will be given immediately if only
|
|
Nice! I didn't know about that @MikeMcC399 . Thanks for the information on that! |
Current behavior
Setting up a Dockerfile, when running install it fails to download Cypress and I don't quite understand why, seems like a Cypress issue
Desired behavior
bun install --frozen-lockfile
should installTest code to reproduce
I'm attempting to build a Dockerfile for Invoice Ninja, and this is the relevant code
with the following for Cypress in the package.json
"cypress": "^12.5.1",
Cypress Version
12.8.1 was attempted install
Node version
Bun 1.0.22
Operating System
Docker
Debug Logs
No response
Other
No response
The text was updated successfully, but these errors were encountered: