-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Error when using yarn install on multi-platforms with optionalDependencies #1435
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
Comments
I actually see two solutions to that issue. (I did two commit, preferring the second solution, I did a pull request) In the file Solution 1: Simply mark all dependencies of an optionalDependency as optional. Solution 2: Check if the optional dependency works with the os, if it doesn't just pass it. |
This is still an issue, the fix provided by @mvestergaard doesn't affect this one. Here is a screenshot of my last try: |
I think that is caused by the same as #2142 |
I think I've figured out a way around this
|
This is a big problem for Electron apps, it means that any |
Mark all dependencies of optional dependencies as themselves optional, so that if they fail, the whole install process doesn't fail.
Circumvents a yarn bug (yarnpkg/yarn#1435).
Do you want to request a feature or report a bug?
Bug.
What is the current behavior?
I get an error while using
yarn install
instead of just ignoring the dependency.If the current behavior is a bug, please provide the steps to reproduce.
Here is an excerpt of my package.json:
Then :
yarn install
Result:
As a comment, it is important to underline that appdmg has actually a dependency named ds-store that has one named macos-alias.
What is the expected behavior?
Yarn should completely ignore appdmg, therefore any dependency related to it.
Please mention your node.js, yarn and operating system version.
Node: 6.5.0
OS: Linux Ubuntu 16.04 (work on OSX 10.10.5 since appdmg is for Darwin).
The text was updated successfully, but these errors were encountered: