# Installing npm package when installing node

**URL:** https://discourse.nodered.org/t/installing-npm-package-when-installing-node/45534
**Category:** Developing Nodes
**Created:** [12 May 2021 10:05 UTC](https://discourse.nodered.org/t/installing-npm-package-when-installing-node/45534 "2021-05-12T10:05:26Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![jake123](https://avatars.discourse-cdn.com/v4/letter/j/ac8455/32.png) [@jake123](https://discourse.nodered.org/u/jake123)
#### Post date: [12 May 2021 10:05 UTC](https://discourse.nodered.org/t/installing-npm-package-when-installing-node/45534/1 "2021-05-12T10:05:27Z")

</div>

Can I somehow make that when i install my node in node-red that it installs the required npm packages?

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [12 May 2021 10:16 UTC](https://discourse.nodered.org/t/installing-npm-package-when-installing-node/45534/2 "2021-05-12T10:16:58Z")

</div>

You add it as a dependency to your package.json.

"Specifying dependencies and devDependencies in a package.json file | npm Docs" [https://docs.npmjs.com/specifying-dependencies-and-devdependencies-in-a-package-json-file](https://docs.npmjs.com/specifying-dependencies-and-devdependencies-in-a-package-json-file)

---

<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: [12 May 2021 12:35 UTC](https://discourse.nodered.org/t/installing-npm-package-when-installing-node/45534/3 "2021-05-12T12:35:47Z")

</div>

This is also documented in the node red docs for creating nodes. You have been pointed at those documents a number of times but I think maybe you need to read them again more carefully. [Packaging : Node-RED](https://nodered.org/docs/creating-nodes/packaging)

---

<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: [11 July 2021 12:36 UTC](https://discourse.nodered.org/t/installing-npm-package-when-installing-node/45534/4 "2021-07-11T12:36:22Z")

</div>

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