# Update Library automatically

**URL:** <https://discourse.nodered.org/t/update-library-automatically/56176>\
**Category:** General\
**Created:** [5 January 2022 21:27 UTC](https://discourse.nodered.org/t/update-library-automatically/56176 "2022-01-05T21:27:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![knubbl](https://avatars.discourse-cdn.com/v4/letter/k/e9a140/32.png) [@knubbl](https://discourse.nodered.org/u/knubbl)\
**Post date:** [5 January 2022 21:27 UTC](https://discourse.nodered.org/t/update-library-automatically/56176/1 "2022-01-05T21:27:25Z")

</div>

HI,

is there any workflow which automatically catches nodes from the palette when defined in packeage.json?

What i want to do is move my flows from a local instance to a docker container. so i need to install all nodes which i already installed again?  
I think i can also copy the node\_module folder but therefore i need to update several nodes.  
Is there any way to install them while docker compose?

Thx

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [5 January 2022 21:49 UTC](https://discourse.nodered.org/t/update-library-automatically/56176/2 "2022-01-05T21:49:07Z")

</div>

What you need to do is to copy package.json and package-lock.json. Then if you go into the folder where your flows file is and run `npm install`. That will install the nodes you need. At least that is how you would do it in a normal installation. It may be different in a Docker environment.

package.json defines which nodes to install (with various constraints on versions).  
package-lock.json defines exactly which versions to install. If you always want to install the latest versions then you don't need the lock file.

---

<div class="post-metadata">

**Author:** ![knubbl](https://avatars.discourse-cdn.com/v4/letter/k/e9a140/32.png) [@knubbl](https://discourse.nodered.org/u/knubbl)\
**Post date:** [5 January 2022 23:05 UTC](https://discourse.nodered.org/t/update-library-automatically/56176/3 "2022-01-05T23:05:29Z")

</div>

thank you.

that gives me a better understanding and i think i am familiar now with how to solve this in docker container.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [6 March 2022 23:06 UTC](https://discourse.nodered.org/t/update-library-automatically/56176/4 "2022-03-06T23:06:24Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
