-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Yarn insists on installing platform specific optional dependencies #2437
Comments
Hm, wait. This is only happens when I run |
Okay, I'll rewrite the issue description here, so the original message doesn't get lost: We're looking forward to move to Yarn for https://github.com/resin-io/etcher. Here's what I get if I clone the repo and run $ git clone https://github.com/resin-io/etcher
$ yarn install
yarn install v0.19.0
info No lockfile found.
warning npm-shrinkwrap.json found. This will not be updated or respected. See https://yarnpkg.com/en/docs/migrating-from-npm for more information.
[1/4] 🔍 Resolving packages...
warning file-tail@0.3.0: this package is no longer updated or maintained
warning electron-prebuilt@1.4.4: electron-prebuilt has been renamed to electron. For more details, see http://electron.atom.io/blog/2016/08/16/npm-install-electron
warning file-tail > file-size-watcher@0.2.1: this package is no longer updated or maintained
warning etcher-image-write > progress-stream > through2 > xtend > object-keys@0.4.0:
warning electron-packager > asar > mksnapshot > request > node-uuid@1.4.7: use uuid module instead
[2/4] 🚚 Fetching packages...
warning removedrive@1.1.1: The platform "darwin" is incompatible with this module.
info "removedrive@1.1.1" is an optional dependency and failed compatibility check. Excluding it from installation.
warning elevator@2.1.0: The platform "darwin" is incompatible with this module.
info "elevator@2.1.0" is an optional dependency and failed compatibility check. Excluding it from installation.
error diskpart@1.0.1: The platform "darwin" is incompatible with this module.
error Found incompatible module
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. I originally though the issue was related to This module is an optional dependency of Etcher itself: ...
"optionalDependencies": {
"elevator": "^2.1.0",
"removedrive": "^1.1.1"
},
.. And its a Windows only package: ...
"os": [
"win32"
],
... The same argument from the original issue holds: Since |
I'm having this issue as well, with the following: we have the following in our package.json
error: |
Closing stale issues |
Do you want to request a feature or report a bug?
A bug.
What is the current behavior?
I'm trying to add the
etcher-image-write
module, which contains a Windows specific optional dependency:The
diskpart
module declares in itspackage.json
that can only be installed on Windows:However I get the following output when trying to add
etcher-image-write
:If the current behavior is a bug, please provide the steps to reproduce.
What is the expected behavior?
Since
diskpart
is an optional dependency ofetcher-image-write
, Yarn should not throw an error if there is a platform mismatch, and simply omit it, like npm.Please mention your node.js, yarn and operating system version.
The text was updated successfully, but these errors were encountered: