yarnpkg / yarn

The 1.x line is frozen - features and bugfixes now happen on https://github.com/yarnpkg/berry
https://classic.yarnpkg.com
Other
41.4k stars 2.72k forks source link

Yarn is not deterministic when adding a new package to an existing project vs. a clean install #3363

Closed wereHamster closed 7 years ago

wereHamster commented 7 years ago

If you start with a clean create-react-app (v1.2.1) project, yarn installs babel-loader but its dependency babel-core is moved to the top-level node_modules so that it can be shared by all packages.

When you then add the two packages react-svg-loader and svg-react-loader yarn keeps the top-level babel-core, so that babel-loader continues to use that version (v6.22.1).

However when you remove all dependencies (rm -rf node_modules) and let yarn install everything afresh, it will install babel-core v6.13.2 as a private dependency of babel-loader, which is incompatible with other packages.

Steps to reproduce

$ ceate-react-app yarn-bug
$ cd yarn-bug
$ yarn build # works
$ yarn add react-svg-loader svg-react-loader
$ yarn build # works, too
$ rm -rf node_modules
$ yarn
$ yarn build # fails
bestander commented 7 years ago

That sucks, we need to fix it, thanks for the steps

bestander commented 7 years ago

What is the error message?

wereHamster commented 7 years ago
β€Ί create-react-app yarn-bug
Creating a new React app in /Users/tomc/yarn-bug.

Installing packages. This might take a couple minutes.
Installing react, react-dom, and react-scripts...

yarn add v0.23.4
info No lockfile found.
[1/4] πŸ”  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] πŸ”—  Linking dependencies...
[4/4] πŸ“ƒ  Building fresh packages...
success Saved lockfile.
success Saved 769 new dependencies.
β”œβ”€ abab@1.0.3
β”œβ”€ abbrev@1.1.0
β”œβ”€ accepts@1.3.3
β”œβ”€ acorn-globals@3.1.0
β”œβ”€ acorn-jsx@3.0.1
β”œβ”€ acorn@3.3.0
β”œβ”€ ajv-keywords@1.5.1
β”œβ”€ ajv@4.11.8
β”œβ”€ align-text@0.1.4
β”œβ”€ alphanum-sort@1.0.2
β”œβ”€ amdefine@1.0.1
β”œβ”€ ansi-escapes@1.4.0
β”œβ”€ ansi-html@0.0.5
β”œβ”€ ansi-regex@2.1.1
β”œβ”€ ansi-styles@2.2.1
β”œβ”€ ansicolors@0.2.1
β”œβ”€ anymatch@1.3.0
β”œβ”€ append-transform@0.4.0
β”œβ”€ aproba@1.1.1
β”œβ”€ are-we-there-yet@1.1.4
β”œβ”€ argparse@1.0.9
β”œβ”€ aria-query@0.3.0
β”œβ”€ arr-diff@2.0.0
β”œβ”€ arr-flatten@1.0.3
β”œβ”€ array-equal@1.0.0
β”œβ”€ array-flatten@1.1.1
β”œβ”€ array-union@1.0.2
β”œβ”€ array-uniq@1.0.3
β”œβ”€ array-unique@0.2.1
β”œβ”€ arrify@1.0.1
β”œβ”€ asap@2.0.5
β”œβ”€ asn1@0.2.3
β”œβ”€ assert-plus@1.0.0
β”œβ”€ assert@1.4.1
β”œβ”€ ast-types-flow@0.0.7
β”œβ”€ async-each@1.0.1
β”œβ”€ async@1.5.2
β”œβ”€ asynckit@0.4.0
β”œβ”€ autoprefixer@6.7.2
β”œβ”€ aws-sign2@0.6.0
β”œβ”€ aws4@1.6.0
β”œβ”€ babel-code-frame@6.22.0
β”œβ”€ babel-core@6.22.1
β”œβ”€ babel-eslint@7.1.1
β”œβ”€ babel-generator@6.24.1
β”œβ”€ babel-helper-builder-binary-assignment-operator-visitor@6.24.1
β”œβ”€ babel-helper-builder-react-jsx@6.24.1
β”œβ”€ babel-helper-call-delegate@6.24.1
β”œβ”€ babel-helper-define-map@6.24.1
β”œβ”€ babel-helper-explode-assignable-expression@6.24.1
β”œβ”€ babel-helper-function-name@6.24.1
β”œβ”€ babel-helper-get-function-arity@6.24.1
β”œβ”€ babel-helper-hoist-variables@6.24.1
β”œβ”€ babel-helper-optimise-call-expression@6.24.1
β”œβ”€ babel-helper-regex@6.24.1
β”œβ”€ babel-helper-remap-async-to-generator@6.24.1
β”œβ”€ babel-helper-replace-supers@6.24.1
β”œβ”€ babel-helpers@6.24.1
β”œβ”€ babel-jest@18.0.0
β”œβ”€ babel-loader@6.2.10
β”œβ”€ babel-messages@6.23.0
β”œβ”€ babel-plugin-check-es2015-constants@6.22.0
β”œβ”€ babel-plugin-istanbul@3.1.2
β”œβ”€ babel-plugin-jest-hoist@18.0.0
β”œβ”€ babel-plugin-syntax-async-functions@6.13.0
β”œβ”€ babel-plugin-syntax-class-properties@6.13.0
β”œβ”€ babel-plugin-syntax-exponentiation-operator@6.13.0
β”œβ”€ babel-plugin-syntax-flow@6.18.0
β”œβ”€ babel-plugin-syntax-jsx@6.18.0
β”œβ”€ babel-plugin-syntax-object-rest-spread@6.13.0
β”œβ”€ babel-plugin-syntax-trailing-function-commas@6.22.0
β”œβ”€ babel-plugin-transform-async-to-generator@6.24.1
β”œβ”€ babel-plugin-transform-class-properties@6.22.0
β”œβ”€ babel-plugin-transform-es2015-arrow-functions@6.22.0
β”œβ”€ babel-plugin-transform-es2015-block-scoped-functions@6.22.0
β”œβ”€ babel-plugin-transform-es2015-block-scoping@6.24.1
β”œβ”€ babel-plugin-transform-es2015-classes@6.24.1
β”œβ”€ babel-plugin-transform-es2015-computed-properties@6.24.1
β”œβ”€ babel-plugin-transform-es2015-destructuring@6.23.0
β”œβ”€ babel-plugin-transform-es2015-duplicate-keys@6.24.1
β”œβ”€ babel-plugin-transform-es2015-for-of@6.23.0
β”œβ”€ babel-plugin-transform-es2015-function-name@6.24.1
β”œβ”€ babel-plugin-transform-es2015-literals@6.22.0
β”œβ”€ babel-plugin-transform-es2015-modules-amd@6.24.1
β”œβ”€ babel-plugin-transform-es2015-modules-commonjs@6.24.1
β”œβ”€ babel-plugin-transform-es2015-modules-systemjs@6.24.1
β”œβ”€ babel-plugin-transform-es2015-modules-umd@6.24.1
β”œβ”€ babel-plugin-transform-es2015-object-super@6.24.1
β”œβ”€ babel-plugin-transform-es2015-parameters@6.24.1
β”œβ”€ babel-plugin-transform-es2015-shorthand-properties@6.24.1
β”œβ”€ babel-plugin-transform-es2015-spread@6.22.0
β”œβ”€ babel-plugin-transform-es2015-sticky-regex@6.24.1
β”œβ”€ babel-plugin-transform-es2015-template-literals@6.22.0
β”œβ”€ babel-plugin-transform-es2015-typeof-symbol@6.23.0
β”œβ”€ babel-plugin-transform-es2015-unicode-regex@6.24.1
β”œβ”€ babel-plugin-transform-exponentiation-operator@6.24.1
β”œβ”€ babel-plugin-transform-flow-strip-types@6.22.0
β”œβ”€ babel-plugin-transform-object-rest-spread@6.22.0
β”œβ”€ babel-plugin-transform-react-constant-elements@6.22.0
β”œβ”€ babel-plugin-transform-react-display-name@6.23.0
β”œβ”€ babel-plugin-transform-react-jsx-self@6.22.0
β”œβ”€ babel-plugin-transform-react-jsx-source@6.22.0
β”œβ”€ babel-plugin-transform-react-jsx@6.22.0
β”œβ”€ babel-plugin-transform-regenerator@6.22.0
β”œβ”€ babel-plugin-transform-runtime@6.22.0
β”œβ”€ babel-plugin-transform-strict-mode@6.24.1
β”œβ”€ babel-preset-env@1.2.1
β”œβ”€ babel-preset-jest@18.0.0
β”œβ”€ babel-preset-react-app@2.2.0
β”œβ”€ babel-preset-react@6.22.0
β”œβ”€ babel-register@6.24.1
β”œβ”€ babel-runtime@6.23.0
β”œβ”€ babel-template@6.24.1
β”œβ”€ babel-traverse@6.24.1
β”œβ”€ babel-types@6.24.1
β”œβ”€ babylon@6.17.1
β”œβ”€ balanced-match@0.4.2
β”œβ”€ base64-js@1.2.0
β”œβ”€ batch@0.5.3
β”œβ”€ bcrypt-pbkdf@1.0.1
β”œβ”€ big.js@3.1.3
β”œβ”€ binary-extensions@1.8.0
β”œβ”€ block-stream@0.0.9
β”œβ”€ bluebird@3.5.0
β”œβ”€ boolbase@1.0.0
β”œβ”€ boom@2.10.1
β”œβ”€ brace-expansion@1.1.7
β”œβ”€ braces@1.8.5
β”œβ”€ browser-resolve@1.11.2
β”œβ”€ browserify-aes@0.4.0
β”œβ”€ browserify-zlib@0.1.4
β”œβ”€ browserslist@1.7.7
β”œβ”€ bser@1.0.2
β”œβ”€ buffer-shims@1.0.0
β”œβ”€ buffer@4.9.1
β”œβ”€ builtin-modules@1.1.1
β”œβ”€ builtin-status-codes@3.0.0
β”œβ”€ bytes@2.3.0
β”œβ”€ caller-path@0.1.0
β”œβ”€ callsites@2.0.0
β”œβ”€ camel-case@3.0.0
β”œβ”€ camelcase@3.0.0
β”œβ”€ caniuse-api@1.6.1
β”œβ”€ caniuse-db@1.0.30000667
β”œβ”€ cardinal@1.0.0
β”œβ”€ case-sensitive-paths-webpack-plugin@1.1.4
β”œβ”€ caseless@0.12.0
β”œβ”€ center-align@0.1.3
β”œβ”€ chalk@1.1.3
β”œβ”€ chokidar@1.7.0
β”œβ”€ ci-info@1.0.0
β”œβ”€ circular-json@0.3.1
β”œβ”€ clap@1.1.3
β”œβ”€ clean-css@4.0.13
β”œβ”€ cli-cursor@1.0.2
β”œβ”€ cli-table@0.3.1
β”œβ”€ cli-usage@0.1.4
β”œβ”€ cli-width@2.1.0
β”œβ”€ cliui@2.1.0
β”œβ”€ clone@1.0.2
β”œβ”€ co@4.6.0
β”œβ”€ coa@1.0.1
β”œβ”€ code-point-at@1.1.0
β”œβ”€ color-convert@1.9.0
β”œβ”€ color-name@1.1.2
β”œβ”€ color-string@0.3.0
β”œβ”€ color@0.11.4
β”œβ”€ colormin@1.1.2
β”œβ”€ colors@1.1.2
β”œβ”€ combined-stream@1.0.5
β”œβ”€ commander@2.9.0
β”œβ”€ commondir@1.0.1
β”œβ”€ compressible@2.0.10
β”œβ”€ compression@1.6.2
β”œβ”€ concat-map@0.0.1
β”œβ”€ concat-stream@1.6.0
β”œβ”€ connect-history-api-fallback@1.3.0
β”œβ”€ console-browserify@1.1.0
β”œβ”€ console-control-strings@1.1.0
β”œβ”€ constants-browserify@1.0.0
β”œβ”€ contains-path@0.1.0
β”œβ”€ content-disposition@0.5.2
β”œβ”€ content-type-parser@1.0.1
β”œβ”€ content-type@1.0.2
β”œβ”€ convert-source-map@1.5.0
β”œβ”€ cookie-signature@1.0.6
β”œβ”€ cookie@0.3.1
β”œβ”€ core-js@2.4.1
β”œβ”€ core-util-is@1.0.2
β”œβ”€ cosmiconfig@2.1.3
β”œβ”€ cross-spawn@4.0.2
β”œβ”€ cryptiles@2.0.5
β”œβ”€ crypto-browserify@3.3.0
β”œβ”€ css-color-names@0.0.4
β”œβ”€ css-loader@0.26.1
β”œβ”€ css-select@1.2.0
β”œβ”€ css-selector-tokenizer@0.6.0
β”œβ”€ css-what@2.1.0
β”œβ”€ cssesc@0.1.0
β”œβ”€ cssnano@3.10.0
β”œβ”€ csso@2.3.2
β”œβ”€ cssom@0.3.2
β”œβ”€ cssstyle@0.2.37
β”œβ”€ d@1.0.0
β”œβ”€ damerau-levenshtein@1.0.4
β”œβ”€ dashdash@1.14.1
β”œβ”€ date-now@0.1.4
β”œβ”€ debug@2.6.6
β”œβ”€ decamelize@1.2.0
β”œβ”€ deep-extend@0.4.2
β”œβ”€ deep-is@0.1.3
β”œβ”€ default-require-extensions@1.0.0
β”œβ”€ defined@1.0.0
β”œβ”€ del@2.2.2
β”œβ”€ delayed-stream@1.0.0
β”œβ”€ delegates@1.0.0
β”œβ”€ depd@1.1.0
β”œβ”€ destroy@1.0.4
β”œβ”€ detect-indent@4.0.0
β”œβ”€ detect-port@1.1.0
β”œβ”€ diff@3.2.0
β”œβ”€ doctrine@1.5.0
β”œβ”€ dom-converter@0.1.4
β”œβ”€ dom-serializer@0.1.0
β”œβ”€ domain-browser@1.1.7
β”œβ”€ domelementtype@1.3.0
β”œβ”€ domhandler@2.1.0
β”œβ”€ domutils@1.1.6
β”œβ”€ dotenv@2.0.0
β”œβ”€ duplexer@0.1.1
β”œβ”€ ecc-jsbn@0.1.1
β”œβ”€ ee-first@1.1.1
β”œβ”€ electron-to-chromium@1.3.10
β”œβ”€ emoji-regex@6.4.2
β”œβ”€ emojis-list@2.1.0
β”œβ”€ encodeurl@1.0.1
β”œβ”€ encoding@0.1.12
β”œβ”€ enhanced-resolve@0.9.1
β”œβ”€ entities@1.1.1
β”œβ”€ errno@0.1.4
β”œβ”€ error-ex@1.3.1
β”œβ”€ es5-ext@0.10.16
β”œβ”€ es6-iterator@2.0.1
β”œβ”€ es6-map@0.1.5
β”œβ”€ es6-set@0.1.5
β”œβ”€ es6-symbol@3.1.1
β”œβ”€ es6-weak-map@2.0.2
β”œβ”€ escape-html@1.0.3
β”œβ”€ escape-string-regexp@1.0.5
β”œβ”€ escodegen@1.8.1
β”œβ”€ escope@3.6.0
β”œβ”€ eslint-config-react-app@0.6.2
β”œβ”€ eslint-import-resolver-node@0.2.3
β”œβ”€ eslint-loader@1.6.0
β”œβ”€ eslint-module-utils@1.0.0
β”œβ”€ eslint-plugin-flowtype@2.21.0
β”œβ”€ eslint-plugin-import@2.0.1
β”œβ”€ eslint-plugin-jsx-a11y@4.0.0
β”œβ”€ eslint-plugin-react@6.4.1
β”œβ”€ eslint@3.16.1
β”œβ”€ espree@3.4.3
β”œβ”€ esprima@2.7.3
β”œβ”€ esrecurse@4.1.0
β”œβ”€ estraverse@4.2.0
β”œβ”€ esutils@2.0.2
β”œβ”€ etag@1.8.0
β”œβ”€ event-emitter@0.3.5
β”œβ”€ eventemitter3@1.2.0
β”œβ”€ events@1.1.1
β”œβ”€ eventsource@0.1.6
β”œβ”€ exec-sh@0.2.0
β”œβ”€ exit-hook@1.1.1
β”œβ”€ expand-brackets@0.1.5
β”œβ”€ expand-range@1.8.2
β”œβ”€ express@4.15.2
β”œβ”€ extend@3.0.1
β”œβ”€ extglob@0.3.2
β”œβ”€ extract-text-webpack-plugin@1.0.1
β”œβ”€ extsprintf@1.0.2
β”œβ”€ fast-levenshtein@2.0.6
β”œβ”€ fastparse@1.1.1
β”œβ”€ faye-websocket@0.10.0
β”œβ”€ fb-watchman@1.9.2
β”œβ”€ fbjs@0.8.12
β”œβ”€ figures@1.7.0
β”œβ”€ file-entry-cache@2.0.0
β”œβ”€ file-loader@0.10.0
β”œβ”€ filename-regex@2.0.1
β”œβ”€ fileset@2.0.3
β”œβ”€ filesize@3.3.0
β”œβ”€ fill-range@2.2.3
β”œβ”€ finalhandler@1.0.2
β”œβ”€ find-cache-dir@0.1.1
β”œβ”€ find-up@1.1.2
β”œβ”€ flat-cache@1.2.2
β”œβ”€ flatten@1.0.2
β”œβ”€ for-in@1.0.2
β”œβ”€ for-own@0.1.5
β”œβ”€ forever-agent@0.6.1
β”œβ”€ form-data@2.1.4
β”œβ”€ forwarded@0.1.0
β”œβ”€ fresh@0.5.0
β”œβ”€ fs-extra@0.30.0
β”œβ”€ fs.realpath@1.0.0
β”œβ”€ fsevents@1.0.17
β”œβ”€ fstream-ignore@1.0.5
β”œβ”€ fstream@1.0.11
β”œβ”€ function-bind@1.1.0
β”œβ”€ gauge@2.7.4
β”œβ”€ generate-function@2.0.0
β”œβ”€ generate-object-property@1.2.0
β”œβ”€ get-caller-file@1.0.2
β”œβ”€ getpass@0.1.7
β”œβ”€ glob-base@0.3.0
β”œβ”€ glob-parent@2.0.0
β”œβ”€ glob@7.1.1
β”œβ”€ globals@9.17.0
β”œβ”€ globby@5.0.0
β”œβ”€ graceful-fs@4.1.11
β”œβ”€ graceful-readlink@1.0.1
β”œβ”€ growly@1.3.0
β”œβ”€ gzip-size@3.0.0
β”œβ”€ handlebars@4.0.8
β”œβ”€ har-schema@1.0.5
β”œβ”€ har-validator@4.2.1
β”œβ”€ has-ansi@2.0.0
β”œβ”€ has-flag@1.0.0
β”œβ”€ has-unicode@2.0.1
β”œβ”€ has@1.0.1
β”œβ”€ hawk@3.1.3
β”œβ”€ he@1.1.1
β”œβ”€ hoek@2.16.3
β”œβ”€ home-or-tmp@2.0.0
β”œβ”€ hosted-git-info@2.4.2
β”œβ”€ html-comment-regex@1.1.1
β”œβ”€ html-encoding-sniffer@1.0.1
β”œβ”€ html-entities@1.2.0
β”œβ”€ html-minifier@3.4.4
β”œβ”€ html-webpack-plugin@2.24.0
β”œβ”€ htmlparser2@3.3.0
β”œβ”€ http-errors@1.5.1
β”œβ”€ http-proxy-middleware@0.17.3
β”œβ”€ http-proxy@1.16.2
β”œβ”€ http-signature@1.1.1
β”œβ”€ https-browserify@0.0.1
β”œβ”€ iconv-lite@0.4.17
β”œβ”€ icss-replace-symbols@1.0.2
β”œβ”€ ieee754@1.1.8
β”œβ”€ ignore@3.3.0
β”œβ”€ imurmurhash@0.1.4
β”œβ”€ indexes-of@1.0.1
β”œβ”€ indexof@0.0.1
β”œβ”€ inflight@1.0.6
β”œβ”€ inherits@2.0.3
β”œβ”€ ini@1.3.4
β”œβ”€ inquirer@0.12.0
β”œβ”€ interpret@0.6.6
β”œβ”€ invariant@2.2.2
β”œβ”€ invert-kv@1.0.0
β”œβ”€ ipaddr.js@1.3.0
β”œβ”€ is-absolute-url@2.1.0
β”œβ”€ is-arrayish@0.2.1
β”œβ”€ is-binary-path@1.0.1
β”œβ”€ is-buffer@1.1.5
β”œβ”€ is-builtin-module@1.0.0
β”œβ”€ is-ci@1.0.10
β”œβ”€ is-directory@0.3.1
β”œβ”€ is-dotfile@1.0.2
β”œβ”€ is-equal-shallow@0.1.3
β”œβ”€ is-extendable@0.1.1
β”œβ”€ is-extglob@1.0.0
β”œβ”€ is-finite@1.0.2
β”œβ”€ is-fullwidth-code-point@1.0.0
β”œβ”€ is-glob@2.0.1
β”œβ”€ is-my-json-valid@2.16.0
β”œβ”€ is-number@2.1.0
β”œβ”€ is-path-cwd@1.0.0
β”œβ”€ is-path-in-cwd@1.0.0
β”œβ”€ is-path-inside@1.0.0
β”œβ”€ is-plain-obj@1.1.0
β”œβ”€ is-posix-bracket@0.1.1
β”œβ”€ is-primitive@2.0.0
β”œβ”€ is-property@1.0.2
β”œβ”€ is-resolvable@1.0.0
β”œβ”€ is-stream@1.1.0
β”œβ”€ is-svg@2.1.0
β”œβ”€ is-typedarray@1.0.0
β”œβ”€ is-utf8@0.2.1
β”œβ”€ isarray@1.0.0
β”œβ”€ isexe@2.0.0
β”œβ”€ isobject@2.1.0
β”œβ”€ isomorphic-fetch@2.2.1
β”œβ”€ isstream@0.1.2
β”œβ”€ istanbul-api@1.1.8
β”œβ”€ istanbul-lib-coverage@1.1.0
β”œβ”€ istanbul-lib-hook@1.0.6
β”œβ”€ istanbul-lib-instrument@1.7.1
β”œβ”€ istanbul-lib-report@1.1.0
β”œβ”€ istanbul-lib-source-maps@1.2.0
β”œβ”€ istanbul-reports@1.1.0
β”œβ”€ jest-changed-files@17.0.2
β”œβ”€ jest-cli@18.1.0
β”œβ”€ jest-config@18.1.0
β”œβ”€ jest-diff@18.1.0
β”œβ”€ jest-environment-jsdom@18.1.0
β”œβ”€ jest-environment-node@18.1.0
β”œβ”€ jest-file-exists@17.0.0
β”œβ”€ jest-haste-map@18.1.0
β”œβ”€ jest-jasmine2@18.1.0
β”œβ”€ jest-matcher-utils@18.1.0
β”œβ”€ jest-matchers@18.1.0
β”œβ”€ jest-mock@18.0.0
β”œβ”€ jest-resolve-dependencies@18.1.0
β”œβ”€ jest-resolve@18.1.0
β”œβ”€ jest-runtime@18.1.0
β”œβ”€ jest-snapshot@18.1.0
β”œβ”€ jest-util@18.1.0
β”œβ”€ jest@18.1.0
β”œβ”€ jodid25519@1.0.2
β”œβ”€ js-base64@2.1.9
β”œβ”€ js-tokens@3.0.1
β”œβ”€ js-yaml@3.8.4
β”œβ”€ jsbn@0.1.1
β”œβ”€ jsdom@9.12.0
β”œβ”€ jsesc@1.3.0
β”œβ”€ json-loader@0.5.4
β”œβ”€ json-schema@0.2.3
β”œβ”€ json-stable-stringify@1.0.1
β”œβ”€ json-stringify-safe@5.0.1
β”œβ”€ json3@3.3.2
β”œβ”€ json5@0.5.1
β”œβ”€ jsonfile@2.4.0
β”œβ”€ jsonify@0.0.0
β”œβ”€ jsonpointer@4.0.1
β”œβ”€ jsprim@1.4.0
β”œβ”€ jsx-ast-utils@1.4.1
β”œβ”€ kind-of@3.2.0
β”œβ”€ klaw@1.3.1
β”œβ”€ lazy-cache@1.0.4
β”œβ”€ lcid@1.0.0
β”œβ”€ levn@0.3.0
β”œβ”€ load-json-file@1.1.0
β”œβ”€ loader-utils@0.2.17
β”œβ”€ lodash._arraycopy@3.0.0
β”œβ”€ lodash._arrayeach@3.0.0
β”œβ”€ lodash._baseassign@3.2.0
β”œβ”€ lodash._baseclone@3.3.0
β”œβ”€ lodash._basecopy@3.0.1
β”œβ”€ lodash._basefor@3.0.3
β”œβ”€ lodash._bindcallback@3.0.1
β”œβ”€ lodash._getnative@3.9.1
β”œβ”€ lodash.assign@4.2.0
β”œβ”€ lodash.camelcase@4.3.0
β”œβ”€ lodash.clonedeep@3.0.2
β”œβ”€ lodash.cond@4.5.2
β”œβ”€ lodash.isarguments@3.1.0
β”œβ”€ lodash.isarray@3.0.4
β”œβ”€ lodash.keys@3.1.2
β”œβ”€ lodash.memoize@4.1.2
β”œβ”€ lodash.pickby@4.6.0
β”œβ”€ lodash.uniq@4.5.0
β”œβ”€ lodash@4.17.4
β”œβ”€ longest@1.0.1
β”œβ”€ loose-envify@1.3.1
β”œβ”€ lower-case@1.1.4
β”œβ”€ lru-cache@4.0.2
β”œβ”€ macaddress@0.2.8
β”œβ”€ makeerror@1.0.11
β”œβ”€ marked-terminal@1.7.0
β”œβ”€ marked@0.3.6
β”œβ”€ math-expression-evaluator@1.2.17
β”œβ”€ media-typer@0.3.0
β”œβ”€ memory-fs@0.3.0
β”œβ”€ merge-descriptors@1.0.1
β”œβ”€ merge@1.2.0
β”œβ”€ methods@1.1.2
β”œβ”€ micromatch@2.3.11
β”œβ”€ mime-db@1.27.0
β”œβ”€ mime-types@2.1.15
β”œβ”€ mime@1.2.11
β”œβ”€ minimatch@3.0.4
β”œβ”€ minimist@1.2.0
β”œβ”€ mkdirp@0.5.1
β”œβ”€ ms@0.7.2
β”œβ”€ mute-stream@0.0.5
β”œβ”€ nan@2.6.2
β”œβ”€ natural-compare@1.4.0
β”œβ”€ ncname@1.0.0
β”œβ”€ negotiator@0.6.1
β”œβ”€ no-case@2.3.1
β”œβ”€ node-emoji@1.5.1
β”œβ”€ node-fetch@1.6.3
β”œβ”€ node-int64@0.4.0
β”œβ”€ node-libs-browser@0.7.0
β”œβ”€ node-notifier@4.6.1
β”œβ”€ node-pre-gyp@0.6.34
β”œβ”€ nopt@4.0.1
β”œβ”€ normalize-package-data@2.3.8
β”œβ”€ normalize-path@2.1.1
β”œβ”€ normalize-range@0.1.2
β”œβ”€ normalize-url@1.9.1
β”œβ”€ npmlog@4.1.0
β”œβ”€ nth-check@1.0.1
β”œβ”€ num2fraction@1.2.2
β”œβ”€ number-is-nan@1.0.1
β”œβ”€ nwmatcher@1.3.9
β”œβ”€ oauth-sign@0.8.2
β”œβ”€ object-assign@4.1.1
β”œβ”€ object.omit@2.0.1
β”œβ”€ on-finished@2.3.0
β”œβ”€ on-headers@1.0.1
β”œβ”€ once@1.4.0
β”œβ”€ onetime@1.1.0
β”œβ”€ open@0.0.5
β”œβ”€ opn@4.0.2
β”œβ”€ optimist@0.6.1
β”œβ”€ optionator@0.8.2
β”œβ”€ original@1.0.0
β”œβ”€ os-browserify@0.2.1
β”œβ”€ os-homedir@1.0.2
β”œβ”€ os-locale@1.4.0
β”œβ”€ os-tmpdir@1.0.2
β”œβ”€ osenv@0.1.4
β”œβ”€ pako@0.2.9
β”œβ”€ param-case@2.1.1
β”œβ”€ parse-glob@3.0.4
β”œβ”€ parse-json@2.2.0
β”œβ”€ parse5@1.5.1
β”œβ”€ parseurl@1.3.1
β”œβ”€ path-browserify@0.0.0
β”œβ”€ path-exists@2.1.0
β”œβ”€ path-is-absolute@1.0.1
β”œβ”€ path-is-inside@1.0.2
β”œβ”€ path-parse@1.0.5
β”œβ”€ path-to-regexp@0.1.7
β”œβ”€ path-type@1.1.0
β”œβ”€ pbkdf2-compat@2.0.1
β”œβ”€ performance-now@0.2.0
β”œβ”€ pify@2.3.0
β”œβ”€ pinkie-promise@2.0.1
β”œβ”€ pinkie@2.0.4
β”œβ”€ pkg-dir@1.0.0
β”œβ”€ pkg-up@1.0.0
β”œβ”€ pluralize@1.2.1
β”œβ”€ postcss-calc@5.3.1
β”œβ”€ postcss-colormin@2.2.2
β”œβ”€ postcss-convert-values@2.6.1
β”œβ”€ postcss-discard-comments@2.0.4
β”œβ”€ postcss-discard-duplicates@2.1.0
β”œβ”€ postcss-discard-empty@2.1.0
β”œβ”€ postcss-discard-overridden@0.1.1
β”œβ”€ postcss-discard-unused@2.2.3
β”œβ”€ postcss-filter-plugins@2.0.2
β”œβ”€ postcss-load-config@1.2.0
β”œβ”€ postcss-load-options@1.2.0
β”œβ”€ postcss-load-plugins@2.3.0
β”œβ”€ postcss-loader@1.2.2
β”œβ”€ postcss-merge-idents@2.1.7
β”œβ”€ postcss-merge-longhand@2.0.2
β”œβ”€ postcss-merge-rules@2.1.2
β”œβ”€ postcss-message-helpers@2.0.0
β”œβ”€ postcss-minify-font-values@1.0.5
β”œβ”€ postcss-minify-gradients@1.0.5
β”œβ”€ postcss-minify-params@1.2.2
β”œβ”€ postcss-minify-selectors@2.1.1
β”œβ”€ postcss-modules-extract-imports@1.0.1
β”œβ”€ postcss-modules-local-by-default@1.1.1
β”œβ”€ postcss-modules-scope@1.0.2
β”œβ”€ postcss-modules-values@1.2.2
β”œβ”€ postcss-normalize-charset@1.1.1
β”œβ”€ postcss-normalize-url@3.0.8
β”œβ”€ postcss-ordered-values@2.2.3
β”œβ”€ postcss-reduce-idents@2.4.0
β”œβ”€ postcss-reduce-initial@1.0.1
β”œβ”€ postcss-reduce-transforms@1.0.4
β”œβ”€ postcss-selector-parser@2.2.3
β”œβ”€ postcss-svgo@2.1.6
β”œβ”€ postcss-unique-selectors@2.0.2
β”œβ”€ postcss-value-parser@3.3.0
β”œβ”€ postcss-zindex@2.2.0
β”œβ”€ postcss@5.2.17
β”œβ”€ prelude-ls@1.1.2
β”œβ”€ prepend-http@1.0.4
β”œβ”€ preserve@0.2.0
β”œβ”€ pretty-error@2.1.0
β”œβ”€ pretty-format@18.1.0
β”œβ”€ private@0.1.7
β”œβ”€ process-nextick-args@1.0.7
β”œβ”€ process@0.11.10
β”œβ”€ progress@1.1.8
β”œβ”€ promise@7.1.1
β”œβ”€ prop-types@15.5.9
β”œβ”€ proxy-addr@1.1.4
β”œβ”€ prr@0.0.0
β”œβ”€ pseudomap@1.0.2
β”œβ”€ punycode@1.4.1
β”œβ”€ q@1.5.0
β”œβ”€ qs@6.4.0
β”œβ”€ query-string@4.3.4
β”œβ”€ querystring-es3@0.2.1
β”œβ”€ querystring@0.2.0
β”œβ”€ querystringify@1.0.0
β”œβ”€ randomatic@1.1.6
β”œβ”€ range-parser@1.2.0
β”œβ”€ rc@1.2.1
β”œβ”€ react-dev-utils@0.5.2
β”œβ”€ react-dom@15.5.4
β”œβ”€ react-scripts@0.9.5
β”œβ”€ react@15.5.4
β”œβ”€ read-pkg-up@1.0.1
β”œβ”€ read-pkg@1.1.0
β”œβ”€ readable-stream@2.2.9
β”œβ”€ readdirp@2.1.0
β”œβ”€ readline2@1.0.1
β”œβ”€ rechoir@0.6.2
β”œβ”€ recursive-readdir@2.1.1
β”œβ”€ redeyed@1.0.1
β”œβ”€ reduce-css-calc@1.3.0
β”œβ”€ reduce-function-call@1.0.2
β”œβ”€ regenerate@1.3.2
β”œβ”€ regenerator-runtime@0.10.5
β”œβ”€ regenerator-transform@0.9.8
β”œβ”€ regex-cache@0.4.3
β”œβ”€ regexpu-core@1.0.0
β”œβ”€ regjsgen@0.2.0
β”œβ”€ regjsparser@0.1.5
β”œβ”€ relateurl@0.2.7
β”œβ”€ remove-trailing-separator@1.0.1
β”œβ”€ renderkid@2.0.1
β”œβ”€ repeat-element@1.1.2
β”œβ”€ repeat-string@1.6.1
β”œβ”€ repeating@2.0.1
β”œβ”€ request@2.81.0
β”œβ”€ require-directory@2.1.1
β”œβ”€ require-from-string@1.2.1
β”œβ”€ require-main-filename@1.0.1
β”œβ”€ require-uncached@1.0.3
β”œβ”€ requires-port@1.0.0
β”œβ”€ resolve-from@1.0.1
β”œβ”€ resolve@1.3.3
β”œβ”€ restore-cursor@1.0.1
β”œβ”€ right-align@0.1.3
β”œβ”€ rimraf@2.6.1
β”œβ”€ ripemd160@0.2.0
β”œβ”€ run-async@0.1.0
β”œβ”€ rx-lite@3.1.2
β”œβ”€ safe-buffer@5.0.1
β”œβ”€ sane@1.4.1
β”œβ”€ sax@1.2.2
β”œβ”€ semver@5.3.0
β”œβ”€ send@0.15.1
β”œβ”€ serve-index@1.8.0
β”œβ”€ serve-static@1.12.1
β”œβ”€ set-blocking@2.0.0
β”œβ”€ set-immediate-shim@1.0.1
β”œβ”€ setimmediate@1.0.5
β”œβ”€ setprototypeof@1.0.3
β”œβ”€ sha.js@2.2.6
β”œβ”€ shelljs@0.7.7
β”œβ”€ shellwords@0.1.0
β”œβ”€ signal-exit@3.0.2
β”œβ”€ slash@1.0.0
β”œβ”€ slice-ansi@0.0.4
β”œβ”€ sntp@1.0.9
β”œβ”€ sockjs-client@1.0.1
β”œβ”€ sockjs@0.3.18
β”œβ”€ sort-keys@1.1.2
β”œβ”€ source-list-map@0.1.8
β”œβ”€ source-map-support@0.4.15
β”œβ”€ source-map@0.5.6
β”œβ”€ spdx-correct@1.0.2
β”œβ”€ spdx-expression-parse@1.0.4
β”œβ”€ spdx-license-ids@1.2.2
β”œβ”€ sprintf-js@1.0.3
β”œβ”€ sshpk@1.13.0
β”œβ”€ statuses@1.3.1
β”œβ”€ stream-browserify@2.0.1
β”œβ”€ stream-cache@0.0.2
β”œβ”€ stream-http@2.7.1
β”œβ”€ strict-uri-encode@1.1.0
β”œβ”€ string_decoder@0.10.31
β”œβ”€ string-width@1.0.2
β”œβ”€ string.prototype.codepointat@0.2.0
β”œβ”€ stringstream@0.0.5
β”œβ”€ strip-ansi@3.0.1
β”œβ”€ strip-bom@2.0.0
β”œβ”€ strip-json-comments@2.0.1
β”œβ”€ style-loader@0.13.1
β”œβ”€ supports-color@3.2.3
β”œβ”€ svgo@0.7.2
β”œβ”€ symbol-tree@3.2.2
β”œβ”€ table@3.8.3
β”œβ”€ tapable@0.1.10
β”œβ”€ tar-pack@3.4.0
β”œβ”€ tar@2.2.1
β”œβ”€ test-exclude@3.3.0
β”œβ”€ text-table@0.2.0
β”œβ”€ throat@3.0.0
β”œβ”€ through@2.3.8
β”œβ”€ timers-browserify@2.0.2
β”œβ”€ tmpl@1.0.4
β”œβ”€ to-arraybuffer@1.0.1
β”œβ”€ to-fast-properties@1.0.3
β”œβ”€ toposort@1.0.3
β”œβ”€ tough-cookie@2.3.2
β”œβ”€ tr46@0.0.3
β”œβ”€ trim-right@1.0.1
β”œβ”€ tryit@1.0.3
β”œβ”€ tty-browserify@0.0.0
β”œβ”€ tunnel-agent@0.6.0
β”œβ”€ tweetnacl@0.14.5
β”œβ”€ type-check@0.3.2
β”œβ”€ type-is@1.6.15
β”œβ”€ typedarray@0.0.6
β”œβ”€ ua-parser-js@0.7.12
β”œβ”€ uglify-js@2.8.23
β”œβ”€ uglify-to-browserify@1.0.2
β”œβ”€ uid-number@0.0.6
β”œβ”€ uniq@1.0.1
β”œβ”€ uniqid@4.1.1
β”œβ”€ uniqs@2.0.0
β”œβ”€ unpipe@1.0.0
β”œβ”€ upper-case@1.1.3
β”œβ”€ url-loader@0.5.7
β”œβ”€ url-parse@1.1.9
β”œβ”€ url@0.11.0
β”œβ”€ user-home@2.0.0
β”œβ”€ util-deprecate@1.0.2
β”œβ”€ util@0.10.3
β”œβ”€ utila@0.3.3
β”œβ”€ utils-merge@1.0.0
β”œβ”€ uuid@2.0.3
β”œβ”€ validate-npm-package-license@3.0.1
β”œβ”€ vary@1.1.1
β”œβ”€ vendors@1.0.1
β”œβ”€ verror@1.3.6
β”œβ”€ vm-browserify@0.0.4
β”œβ”€ walker@1.0.7
β”œβ”€ watch@0.10.0
β”œβ”€ watchpack@0.2.9
β”œβ”€ webidl-conversions@4.0.1
β”œβ”€ webpack-core@0.6.9
β”œβ”€ webpack-dev-middleware@1.10.2
β”œβ”€ webpack-dev-server@1.16.2
β”œβ”€ webpack-manifest-plugin@1.1.0
β”œβ”€ webpack-sources@0.1.5
β”œβ”€ webpack@1.14.0
β”œβ”€ websocket-driver@0.6.5
β”œβ”€ websocket-extensions@0.1.1
β”œβ”€ whatwg-encoding@1.0.1
β”œβ”€ whatwg-fetch@2.0.2
β”œβ”€ whatwg-url@4.8.0
β”œβ”€ whet.extend@0.9.9
β”œβ”€ which-module@1.0.0
β”œβ”€ which@1.2.14
β”œβ”€ wide-align@1.1.2
β”œβ”€ window-size@0.1.0
β”œβ”€ wordwrap@0.0.2
β”œβ”€ worker-farm@1.3.1
β”œβ”€ wrap-ansi@2.1.0
β”œβ”€ wrappy@1.0.2
β”œβ”€ write@0.2.1
β”œβ”€ xml-char-classes@1.0.0
β”œβ”€ xml-name-validator@2.0.1
β”œβ”€ xtend@4.0.1
β”œβ”€ y18n@3.2.1
β”œβ”€ yallist@2.1.2
β”œβ”€ yargs-parser@4.2.1
└─ yargs@3.10.0
✨  Done in 25.72s.

Success! Created yarn-bug at /Users/tomc/yarn-bug
Inside that directory, you can run several commands:

  yarn start
    Starts the development server.

  yarn run build
    Bundles the app into static files for production.

  yarn test
    Starts the test runner.

  yarn run eject
    Removes this tool and copies build dependencies, configuration files
    and scripts into the app directory. If you do this, you can’t go back!

We suggest that you begin by typing:

  cd yarn-bug
  yarn start

Happy hacking!

tomc in tomc/  
β€Ί cd yarn-bug

tomc in yarn-bug/  
β€Ί yarn build
yarn build v0.23.4
$ react-scripts build 
Creating an optimized production build...
Compiled successfully.

File sizes after gzip:

  46.82 KB  build/static/js/main.7dbe0fa8.js
  289 B     build/static/css/main.9a0fe4f1.css

The project was built assuming it is hosted at the server root.
To override this, specify the homepage in your package.json.
For example, add this to build it for GitHub Pages:

  "homepage": "http://myname.github.io/myapp",

The build folder is ready to be deployed.
You may serve it with a static server:

  yarn global add serve
  serve -s build

✨  Done in 5.92s.

tomc in yarn-bug/  
β€Ί yarn add react-svg-loader svg-react-loader
yarn add v0.23.4
[1/4] πŸ”  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] πŸ”—  Linking dependencies...
[4/4] πŸ“ƒ  Building fresh packages...
success Saved lockfile.
success Saved 42 new dependencies.
β”œβ”€ babel-code-frame@6.22.0
β”œβ”€ babel-generator@6.24.1
β”œβ”€ babel-helpers@6.24.1
β”œβ”€ babel-messages@6.23.0
β”œβ”€ babel-plugin-transform-es2015-block-scoping@6.24.1
β”œβ”€ babel-plugin-transform-es2015-classes@6.24.1
β”œβ”€ babel-plugin-transform-es2015-destructuring@6.23.0
β”œβ”€ babel-plugin-transform-es2015-function-name@6.24.1
β”œβ”€ babel-plugin-transform-es2015-parameters@6.24.1
β”œβ”€ babel-plugin-transform-flow-strip-types@6.22.0
β”œβ”€ babel-plugin-transform-react-display-name@6.23.0
β”œβ”€ babel-plugin-transform-react-jsx-self@6.22.0
β”œβ”€ babel-plugin-transform-react-jsx-source@6.22.0
β”œβ”€ babel-plugin-transform-react-jsx@6.22.0
β”œβ”€ babel-plugin-transform-regenerator@6.22.0
β”œβ”€ babel-preset-es2015-loose@7.0.0
β”œβ”€ babel-preset-es2015@6.13.2
β”œβ”€ babel-preset-react@6.11.1
β”œβ”€ babel-register@6.24.1
β”œβ”€ babel-runtime@6.23.0
β”œβ”€ babel-template@6.24.1
β”œβ”€ babel-traverse@6.24.1
β”œβ”€ babel-types@6.24.1
β”œβ”€ babylon@6.17.1
β”œβ”€ csso@2.0.0
β”œβ”€ loader-utils@0.2.17
β”œβ”€ lodash.assign@4.2.0
β”œβ”€ lodash.isplainobject@4.0.6
β”œβ”€ lodash@4.17.4
β”œβ”€ modify-babel-preset@1.2.0
β”œβ”€ path-exists@1.0.0
β”œβ”€ react-dom@15.5.4
β”œβ”€ react-svg-loader@1.1.1
β”œβ”€ react@15.5.4
β”œβ”€ require-relative@0.8.7
β”œβ”€ sax@1.2.2
β”œβ”€ shebang-regex@1.0.0
β”œβ”€ svg-react-loader@0.3.7
β”œβ”€ svgo@0.6.6
β”œβ”€ xml2js@0.4.17
β”œβ”€ xmlbuilder@4.2.1
└─ yargs-parser@2.4.1
✨  Done in 4.63s.

tomc in yarn-bug/  
β€Ί yarn build
yarn build v0.23.4
$ react-scripts build 
Creating an optimized production build...
Compiled successfully.

File sizes after gzip:

  46.82 KB  build/static/js/main.7dbe0fa8.js
  289 B     build/static/css/main.9a0fe4f1.css

The project was built assuming it is hosted at the server root.
To override this, specify the homepage in your package.json.
For example, add this to build it for GitHub Pages:

  "homepage": "http://myname.github.io/myapp",

The build folder is ready to be deployed.
You may serve it with a static server:

  yarn global add serve
  serve -s build

✨  Done in 5.96s.

tomc in yarn-bug/  
β€Ί rm -rf node_modules

tomc in yarn-bug/  
β€Ί yarn
yarn install v0.23.4
[1/4] πŸ”  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] πŸ”—  Linking dependencies...
[4/4] πŸ“ƒ  Building fresh packages...
success Saved lockfile.
✨  Done in 8.96s.

tomc in yarn-bug/  
β€Ί yarn build
yarn build v0.23.4
$ react-scripts build 
Creating an optimized production build...
Failed to compile.

Module build failed: Error: Options {"targets":{"ie":9,"uglify":true},"useBuiltIns":false} passed to /Users/tomc/yarn-bug/node_modules/babel-preset-env/lib/index.js which does not accept options.
    at /Users/tomc/yarn-bug/node_modules/babel-loader/node_modules/babel-core/lib/transformation/file/options/option-manager.js:333:15
    at Array.map (native)
    at OptionManager.resolvePresets (/Users/tomc/yarn-bug/node_modules/babel-loader/node_modules/babel-core/lib/transformation/file/options/option-manager.js:305:20)
    at OptionManager.mergePresets (/Users/tomc/yarn-bug/node_modules/babel-loader/node_modules/babel-core/lib/transformation/file/options/option-manager.js:288:10)
    at OptionManager.mergeOptions (/Users/tomc/yarn-bug/node_modules/babel-loader/node_modules/babel-core/lib/transformation/file/options/option-manager.js:264:14)
    at /Users/tomc/yarn-bug/node_modules/babel-loader/node_modules/babel-core/lib/transformation/file/options/option-manager.js:289:14
    at /Users/tomc/yarn-bug/node_modules/babel-loader/node_modules/babel-core/lib/transformation/file/options/option-manager.js:342:20
    at Array.map (native)
    at OptionManager.resolvePresets (/Users/tomc/yarn-bug/node_modules/babel-loader/node_modules/babel-core/lib/transformation/file/options/option-manager.js:305:20)
    at OptionManager.mergePresets (/Users/tomc/yarn-bug/node_modules/babel-loader/node_modules/babel-core/lib/transformation/file/options/option-manager.js:288:10)
    at OptionManager.mergeOptions (/Users/tomc/yarn-bug/node_modules/babel-loader/node_modules/babel-core/lib/transformation/file/options/option-manager.js:264:14)
    at OptionManager.init (/Users/tomc/yarn-bug/node_modules/babel-loader/node_modules/babel-core/lib/transformation/file/options/option-manager.js:383:12)
    at File.initOptions (/Users/tomc/yarn-bug/node_modules/babel-loader/node_modules/babel-core/lib/transformation/file/index.js:223:65)
    at new File (/Users/tomc/yarn-bug/node_modules/babel-loader/node_modules/babel-core/lib/transformation/file/index.js:140:24)
    at Pipeline.transform (/Users/tomc/yarn-bug/node_modules/babel-loader/node_modules/babel-core/lib/transformation/pipeline.js:46:16)
    at transpile (/Users/tomc/yarn-bug/node_modules/babel-loader/lib/index.js:38:20)

error Command failed with exit code 1.

tomc in yarn-bug/  
bestander commented 7 years ago

I think I know the reason. There is a step during resolution in install command when Yarn merges semver compatible dependencies and installs the highest compatible one. This step is not run during add command for some reason, which is a bug.

The error you see is probably caused by a breaking change in a library (babel-loader?). PR and help in debugging would be welcome

roman-holovin commented 7 years ago

I have a similar problem with my project. https://github.com/dantix/waterly/tree/eslint-airbnb If I do a clean install, eslint is not working properly. If I install eslint 3.15.0 first, then update it to the 3.19.0 - it will work properly.

I've made a diff of file tree and there is a difference in how eslint dependency is included in modules. In my case, after clean install eslint-config-airbnb has empty node_modules directory, after downgrade and upgrade eslint, it has eslint in local node_modules with 3.16.1 version.

Repro:

cd /tmp
git clone git@github.com:dantix/waterly.git
cd waterly
git checkout eslint-airbnb
yarn
yarn lint # there should be a lot of errors
yarn add eslint@3.15.0
yarn add eslint@3.19.0
yarn lint # there should be a handful of warnings
bestander commented 7 years ago

Thanks for repro steps

On Sun, 14 May 2017 at 20:36, Roman Holovin notifications@github.com wrote:

I have a similar problem with my project. https://github.com/dantix/waterly/tree/eslint-airbnb If I do a clean install, eslint is not working properly. If I install eslint 3.15.0 first, then update it to the 3.19.0 - it will work properly.

I've made a diff of file tree and there is a difference in how eslint dependency is included in modules. In my case, after clean install eslint-config-airbnb has empty node_modules directory, after downgrade and upgrade eslint, it has eslint in local node_modules with 3.16.1 version.

Repro:

cd /tmp git clone git@github.com:dantix/waterly.git cd waterly git checkout eslint-airbnb yarn yarn lint # there should be a lot of errors yarn add eslint@3.15.0 yarn add eslint@3.19.0 yarn lint # there should be a handful of warnings

β€” You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/yarnpkg/yarn/issues/3363#issuecomment-301334610, or mute the thread https://github.com/notifications/unsubscribe-auth/ACBdWN3n059PxE1kfooZLtez7rSRGiYXks5r51ekgaJpZM4NWbwk .

voxsim commented 7 years ago

@bestander maybe I found why it is not deterministic: when we prepare the requests (https://github.com/yarnpkg/yarn/blob/master/src/cli/commands/add.js#L39) for the command yarn add <mypackage> we push errounously <mypackage> instead we should push <mypackage>@<version> like we do in the install command. I tried to fix, but it doesn't work as expected O.o I prefer to share the information, so maybe you can fix it better.

bestander commented 7 years ago

Thanks. The trick is that Yarn replaces with maypackage@version here https://github.com/yarnpkg/yarn/blob/master/src/cli/commands/add.js#L90 at resolution step.

IIRC here https://github.com/yarnpkg/yarn/blob/master/src/package-request.js#L245 the optimization of yarn.lock happens and unused resolutions are getting left out. Would be good to debug and see why it fails for add command.

blexrob commented 7 years ago

When running yarn check after the yarn command from the repro steps, I immediately got some errors. This was caused by the package resolver resolving patterns to different versions based on the order of package version resolve answers. I have filed issue #3466 for that.

arcanis commented 7 years ago

Should be fixed in 0.27.2 πŸ‘