Yarn: When installing with yarn, deps don't work as they would when installing with npm

Created on 17 Oct 2016  路  14Comments  路  Source: yarnpkg/yarn

_using yarn 0.15.1, OSX 10.10.1 and node 6.3.1_

Might be overlooking something really simple here :confused:

But I may have encountered a possible bug with how dependencies are being installed or the versions that may be being installed.

I'm working on a simple project that makes use of webpack-dev-server and utilizes the hot module reloading feature for live updates in the browser and auto bundling.

I set up a clean simple project, and thought I'd give yarn a spin to pull in the dependencies. HMR wouldn't work at all.

As the source hasn't changed I figured it must be the node_modules. I removed all dependencies and reinstalled with npm. HMR has returned and is working as expected.

To make sure yarn was the issue, I removed all deps again and reinstalled with yarn. Sure enough, HMR ceased to work again.

To reproduce, simply start up a project that uses webpack-dev-server with HMR. Test it using deps installed with yarn and then when the deps are installed using npm.

You'd expect HMR to work regardless of which package manager you use to install dependencies.

@jh3y

Most helpful comment

when I tried to migrate my project to yarn, I've had the same issue with webpack-dev-server and react-hot-loader v3.

no idea why 馃

All 14 comments

Same here, but it happens with browsersync, when start my watch gulp job where is browsersync, the job doesn't works

Hmm. Maybe a dependency that both browser-sync and webpack-dev-server rely on then that isn't sitting quite right when installed with yarn :cry:

when I tried to migrate my project to yarn, I've had the same issue with webpack-dev-server and react-hot-loader v3.

no idea why 馃

Hopefully it's something trivial 馃檹

I've encountered a similar issue in the project I'm working on. Slick-carousel works when installed with npm, but fails when installed with yarn.

@tlaak @jh3y have you guys find any solutions? 馃槄

Nope 馃槶

So I'm still not committed to using it.

It worked with version 0.16, but now that I upgraded to 0.16.1 my project is not even building anymore 馃槶

馃槶

I seem to be having much better luck with everything now 馃樃

browser-sync has been working fine for me :tada:

@jh3y

Having similar issues with webpack

Using yarn 0.16.1

@jh3y Is this still happening with the latest version of Yarn (v0.24)?

Sorry for the delayed response 馃槄

Wanted to make sure and try this out with a fresh clone of the same project that prompted opening the issue, a cache clean etc. Good news! Seems the issue has gone for me :tada: HMR and everything else working as expected. It may have been resolved some time/versions ago.

Happy to close this 馃憤

@jh3y Great to know! 馃憤

Was this page helpful?
0 / 5 - 0 ratings