Skip to content

can't ignore optional deps #2126

Description

@yinghaochan

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
yarn add --ignore-optional installs optional deps

If the current behavior is a bug, please provide the steps to reproduce.

$ yarn add babel-cli --ignore-optional
yarn add v0.17.10
[1/4] Resolving packages...
[2/4] Fetching packages...
warning fsevents@1.0.15: The platform "linux" is incompatible with this module.
info "fsevents@1.0.15" is an optional dependency and failed compatibility check. Excluding it from installation.

from yarn.lock

babel-cli@^6.18.0:
  version "6.18.0"
  resolved "https://registry.yarnpkg.com/babel-cli/-/babel-cli-6.18.0.tgz#92117f341add9dead90f6fa7d0a97c0cc08ec186"
  dependencies:
    babel-core "^6.18.0"
    babel-polyfill "^6.16.0"
    babel-register "^6.18.0"
    babel-runtime "^6.9.0"
    commander "^2.8.1"
    convert-source-map "^1.1.0"
    fs-readdir-recursive "^1.0.0"
    glob "^5.0.5"
    lodash "^4.2.0"
    output-file-sync "^1.1.0"
    path-is-absolute "^1.0.0"
    slash "^1.0.0"
    source-map "^0.5.0"
    v8flags "^2.0.10"
  optionalDependencies:
    chokidar "^1.0.0"


chokidar@^1.0.0:
  version "1.6.1"
  resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.6.1.tgz#2f4447ab5e96e50fb3d789fd90d4c72e0e4c70c2"
  dependencies:
    anymatch "^1.3.0"
    async-each "^1.0.0"
    glob-parent "^2.0.0"
    inherits "^2.0.1"
    is-binary-path "^1.0.0"
    is-glob "^2.0.0"
    path-is-absolute "^1.0.0"
    readdirp "^2.0.0"
  optionalDependencies:
    fsevents "^1.0.0"

What is the expected behavior?
optional deps and optional deps in children will not be isntalled

Please mention your node.js, yarn and operating system version.
LTS latest, Ubuntu 14.04 LTS (GNU/Linux 3.13.0-24-generic x86_64)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions