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

[Bug] Fails to install on Termux/Android/Busybox #4733

Closed
FossPrime opened this issue Jul 16, 2019 · 3 comments
Closed

[Bug] Fails to install on Termux/Android/Busybox #4733

FossPrime opened this issue Jul 16, 2019 · 3 comments
Labels
stage: wontfix Cypress does not regard this as an issue or will not implement this feature

Comments

@FossPrime
Copy link

#3984 # Current behavior: Does not install

Screenshot_20190716-104910

Desired behavior:

Install with reduced functionalty. A full npm install failure is undesireable, it's not gracefully degrading.

Steps to reproduce: (app code and test code)

On Termux for Android, no root required:
pkg install nodejs; npm install cypress

Versions

Latest

@flotwig
Copy link
Contributor

flotwig commented Jul 16, 2019

Since Cypress runs in Electron, and Android can't run Electron, there's no "graceful degradation" possible. Failing the install is the correct behavior - there's nothing else that can be done.

Splitting Electron from Cypress (issue: #3900) would make running Cypress on Android possible, though I'm still not sure what benefit this would bring. Could you share your use case for this?

@FossPrime FossPrime changed the title [Bug] Fails to install on Termux/Android [Bug] Fails to install on Termux/Android/Busybox Jul 16, 2019
@FossPrime
Copy link
Author

FossPrime commented Jul 16, 2019

My use case is installing a server with media on a high capacity android phone for offline access. I can also see installing it on a DDWRT router may be useful. I can get around cypress by using --prod with npm.

node is very platform agnostic. Termux is officially supported, based on the NPM installation page. I don't know where to begin in dealing with a package that completely breaks the installation process. fsevents is probably a good example of how to handle it, it fails to install gracefully on linux and windows, but works great on mac. Chokidar relies on it, but it doesn't brick the installation. Thus setting up termux to do some offline development on an android phone with termux and git, isn't hindered by using fsevents.

Perhaps the solution is a simple package.json fix, somewhere

@cypress-bot cypress-bot bot added the stage: needs investigating Someone from Cypress needs to look at this label Jul 17, 2019
@flotwig
Copy link
Contributor

flotwig commented Jul 19, 2019

Well, package.json supports mandatory and optional production dependencies - dependencies and optionalDependencies, respectively. It also supports development dependencies - devDependencies. npm install installs both by default, npm install --prod skips devDependencies (and hence, skips Cypress). Sadly, there is no optionalDevDependencies (discussion here), so there's no easy way to make cypress skippable. Normally this is not a problem because typically, end-user products don't ask the user to clone the repo and do npm install.

chokidar makes use of optionalDependencies to make fsevents not break the build: https://github.com/paulmillr/chokidar/blob/master/package.json#L23

There is a package called optional-dev-dependencies that simulates this behavior for dev dependencies, maybe you can make use of this if doing npm install is part of the normal installation for your project: https://github.com/bcoe/optional-dev-dependency

If cypress silently failed on unsupported systems, we'd be doing users a disservice by not running and not notifying the user of this, like if it happened in CI somehow. So that's not really an option.

Going to close this since it's working as it should.

@flotwig flotwig closed this as completed Jul 19, 2019
@flotwig flotwig added stage: wontfix Cypress does not regard this as an issue or will not implement this feature and removed stage: needs investigating Someone from Cypress needs to look at this labels Jul 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stage: wontfix Cypress does not regard this as an issue or will not implement this feature
Projects
None yet
Development

No branches or pull requests

2 participants