yarn install results in corrupted module

Created on 13 Jul 2018  路  5Comments  路  Source: yarnpkg/yarn

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

This is a bug

What is the current behavior?

In deploying a simple change to package.json/yarn.lock which upgrades plotly.js from 1.38.3 to 1.39.1, the result is a corrupted node_modules/plotly.js

Please see: https://github.com/nicolaskruchten/yarnbug

What is the expected behavior?

The expected behaviour is that yarn install correctly upgrades all of the files in node_modules/plotly.js and essentially behaves the same as rm -rf node_modules && yarn install in this particular case.

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

MacOS High Sierra, NodeJS 8.91. OR 10.6.0, yarn 1.7.0

cat-bug

Most helpful comment

@nicolaskruchten I've seen a similar (but not identical) behaviour on 1.7.0 recently: when trying to update a package version, I had the version bumped in package.json and yarn.lock updated correctly, but the actual module in node_modules remained the old version (nothing was updated). Installing a lower version, then going back to the latest version helped, and the common rm -rf node_modules trick also helps. In my case, that's a scoped package (with a name like @if/my-package) on a custom registry that isn't available publicly, so I can't post an example yet.

I've seen this twice already with two different packages. Pretty worrying since there's absolutely no indication that smth is wrong.

MacOS High Sierra, node 8.9.1, yarn 1.7.0

All 5 comments

I should note that this issue isn't restricted to upgrading between those two specific versions of plotly.js ... we've seen it between other pairs of versions!

Additionally, not all files are affected by this bug. src/core.js is for sure, and certain other files are correctly updated but I can't find a good way of identifying others which may be affected like src/core.js. That one is just easy to notice/reason about because it exports the version number!

(bump) this seems like a pretty bad bug in yarn to me...

@nicolaskruchten I've seen a similar (but not identical) behaviour on 1.7.0 recently: when trying to update a package version, I had the version bumped in package.json and yarn.lock updated correctly, but the actual module in node_modules remained the old version (nothing was updated). Installing a lower version, then going back to the latest version helped, and the common rm -rf node_modules trick also helps. In my case, that's a scoped package (with a name like @if/my-package) on a custom registry that isn't available publicly, so I can't post an example yet.

I've seen this twice already with two different packages. Pretty worrying since there's absolutely no indication that smth is wrong.

MacOS High Sierra, node 8.9.1, yarn 1.7.0

Facing similar issue

I can confirm that this no longer happens in version 1.9.2 :)

Was this page helpful?
0 / 5 - 0 ratings