Today I Learned

hashrocket A Hashrocket project

Force upgrade of transitive dependencies in yarn

Somewhere deep within my node_modules lurks a broken package. yarn upgrade node-gyp does nothing for me as the broken node-gyp is a transitive dependency. What's a dev to do?

Yarn has a solution, and it's called selective version resolutions.

I throw this in my package.json, run yarn again, and I'm back in ship shape.

  "resolutions": {"**/**/node-gyp": "^3.8.0" }
See More #javascript TILs
Looking for help? At Hashrocket, our JavaScript experts launch scalable, performant apps on the Web, Android and iOS. Contact us and find out how we can help you.