yarnpkg/yarn

"yarn upgrade --latest" fails if optionalDependencies contains incompatible dependencies

Open

#5,471 opened on Mar 7, 2018

View on GitHub
 (0 comments) (0 reactions) (1 assignee)JavaScript (41,514 stars) (2,731 forks)batch import
cat-bughelp wantedtriaged

Description

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

Bug

What is the current behavior? If optionalDependencies contains packages incompatible with current platform, upgrading fails with error "Found incompatible module".

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

Work under win32 platform:

  1. Create package.json:
{
  "name": "yarn-example",
  "version": "1.0.0",
  "main": "index.js",
  "license": "MIT",
  "optionalDependencies": {
    "fsevents": "1.0.0",
    "chokidar": "2.0.0"
  },
  "private": true
}
  1. Run yarn install
  2. Run yarn upgrade --latest

What is the expected behavior?

Incompatible dependencies are skipped during upgrade

Please mention your node.js, yarn and operating system version.

node 8.9.3 yarn 1.5.1 OS Windows 8.1

Contributor guide