yarn -v 1.13.0 and npm -v 6.8.0 produce different result on npm install, resulting in broken application

Doing yarn and npm install produce different node_modules (it can be tested on package named react-styleguidist)

What is the current behavior?

With yarn, ls node_modules/react-styleguidist/node_modules/.bin:

acorn -> ../../../acorn/bin/acorn
webpack-dev-server -> ../../../webpack-dev-server/bin/webpack-dev-server.js
react-docgen -> ../../../react-docgen/bin/react-docgen.js
findup -> ../../../findup/bin/findup.js
esgenerate -> ../../../escodegen/bin/esgenerate.js
escodegen -> ../../../escodegen/bin/escodegen.js
buble -> ../../../buble/bin/buble

With npm, ls node_modules/react-styleguidist/node_modules/.bin:

acorn -> ../../../acorn/bin/acorn

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

mkdir -p ~/tmp
cd ~/tmp
git clone git@github.com:bootstrap-styled/rsg-components.git
cd rsg-components
git checkout testing-broken-v9
npm install # or `yarn`
npm run styleguide

What is the expected behavior?

We expect to have the same result between npm and yarn.


  • yarn -v 1.13.0
  • npm -v 6.8.0
  • Linux dev-11 4.9.0-8-amd64 #1 SMP Debian 4.9.130-2 (2018-10-27) x86_64 GNU/Linux

Related issues

Looks like @kopax worked out it is this issue: packages with peerDependencies are incorrectly hoisted

Described in this comment: https://github.com/styleguidist/react-styleguidist/issues/1278#issuecomment-471277174

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.