# Kotlin JS: Upgrading a single library in yarn.lock

**URL:** <https://discuss.kotlinlang.org/t/kotlin-js-upgrading-a-single-library-in-yarn-lock/24516>\
**Category:** JavaScript\
**Created:** [April 2, 2022, 12:55pm UTC](https://discuss.kotlinlang.org/t/kotlin-js-upgrading-a-single-library-in-yarn-lock/24516 "2022-04-02T12:55:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Loke](https://avatars.discourse-cdn.com/v4/letter/l/c68b51/32.png) [@Loke](https://discuss.kotlinlang.org/u/Loke)\
**Post date:** [April 2, 2022, 12:55pm UTC](https://discuss.kotlinlang.org/t/kotlin-js-upgrading-a-single-library-in-yarn-lock/24516/1 "2022-04-02T12:55:25Z")

</div>

As is well known, when bringing in just a single library using node, you often end up with a lot of transient dependencies as well.

I am in the situation that I need to upgrade a single transient dependency which is currently locked in yarn.lock. I could edit this file manually to achieve what I want, but it is not really recommended. All the guides online that I can find talks about how to upgrade libraries using the yarn command, but that doesn’t seem to work when using gradle to build a kotlin JS project.

Is there a simple way to achieve what I need?

---

<div class="post-metadata">

**Author:** ![rjaros](https://avatars.discourse-cdn.com/v4/letter/r/9f8e36/32.png) [@rjaros](https://discuss.kotlinlang.org/u/rjaros)\
**Post date:** [April 2, 2022, 1:29pm UTC](https://discuss.kotlinlang.org/t/kotlin-js-upgrading-a-single-library-in-yarn-lock/24516/2 "2022-04-02T13:29:54Z")

</div>

See:

> **[What's new in Kotlin 1.4.20 | Kotlin](https://kotlinlang.org/docs/whatsnew1420.html#selective-yarn-dependency-resolutions)**
