npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

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
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.


Related issues

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

Described in this comment: