# Specify node\_modules folder in settings.js

**URL:** <https://discourse.nodered.org/t/specify-node-modules-folder-in-settings-js/44537>\
**Category:** General\
**Created:** [22 April 2021 11:44 UTC](https://discourse.nodered.org/t/specify-node-modules-folder-in-settings-js/44537 "2021-04-22T11:44:27Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![Lupin\_III](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lupin_iii/32/67650_2.png) [@Lupin\_III](https://discourse.nodered.org/u/Lupin_III)\
**Post date:** [23 April 2021 17:21 UTC](https://discourse.nodered.org/t/specify-node-modules-folder-in-settings-js/44537/12 "2021-04-23T17:21:39Z")

</div>

I made some test and at the and I'm going to summarize it, hoping will be useful to the others.

- Windows 10
- main folder: .node-red (installation patch)
- settings.js as it is (no change for userDir)
- my\_folder (new folder containing my node-red project. (running node-red with the option -u .....\my\_folder)
- create junction to .node-red\node\_modules with the command mklink /J (as administrator)
- create hard link to .node-red\package.json with the command mklink /H (as administrator)

From now on:

- all the nodes must be installed from the main instance, the one simply running with node-red command
- the "my\_folder" node-red instance must be restarted in order to update the new installed nodes
- the package.json inside "my\_folder" apparently doesn't came update (if you open it won't see the new ones) but actually it's node-red instance will find all new nodes and works perfectly.  
Of course it would be better to update it as the others suggest
- Don't to try to install/update nodes from the "my\_folder" node-red instance. In this case the link to .node-red\node\_modules will be broken (I don't know why), and you cannot install/update any nodes any more.

At this point, a part for the nodes, can someone tell me which are the files/directory to backup?  
I think they are all but: node\_modules (directory), .config.nodes.json (file). Is that correct?

---

_[View the full topic](https://discourse.nodered.org/t/specify-node-modules-folder-in-settings-js/44537)._
