# Local GitLab npm register as node source

**URL:** <https://discourse.nodered.org/t/local-gitlab-npm-register-as-node-source/35811>\
**Category:** General\
**Created:** [12 November 2020 13:37 UTC](https://discourse.nodered.org/t/local-gitlab-npm-register-as-node-source/35811 "2020-11-12T13:37:08Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![NetHans](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nethans/32/2843_2.png) [@NetHans](https://discourse.nodered.org/u/NetHans)\
**Post date:** [12 November 2020 13:37 UTC](https://discourse.nodered.org/t/local-gitlab-npm-register-as-node-source/35811/1 "2020-11-12T13:37:08Z")

</div>

Does anyone have already gained experience of integrating npm packages from a local GitLab server into the Node-RED Manage range? Does a script already exist to generate the catalog for Node-RED automatically?

---

<div class="post-metadata">

**Author:** ![hardillb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hardillb/32/12373_2.png) [@hardillb](https://discourse.nodered.org/u/hardillb)\
**Post date:** [12 November 2020 23:20 UTC](https://discourse.nodered.org/t/local-gitlab-npm-register-as-node-source/35811/2 "2020-11-12T23:20:20Z")

</div>

Have a look at this blog post:

> **[Advanced Multi Tenant Node-RED topics](https://www.hardill.me.uk/wordpress/2020/10/22/advanced-multi-tenant-node-red-topics/)**
>
> Across the last 6 posts I’ve walked through deploying a Multi Tenant Node-RED service. In this post I’m going to talk about how you go about customising the install to make it more spec…

It covers how to add a custom node catalogue to supplement the default one hosted on [flows.nodered.org](http://flows.nodered.org). In the post I used a custom NPM registry but you should be able to use the full http:// url of the gitlab project as the `id` field to install packages directly from the repo. (I've not actually tested this, but I think it should work)

Also it looks like you can use gitlab as a private npm repository ([docs](https://docs.gitlab.com/ee/user/packages/npm_registry/)) so you could just use scoped node names as described in the post.

You might also be able to modify [this](https://github.com/hardillb/multi-tenant-node-red-manager/blob/master/build-catalogue.js) script to build the catalogue file

---

<div class="post-metadata">

**Author:** ![NetHans](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nethans/32/2843_2.png) [@NetHans](https://discourse.nodered.org/u/NetHans)\
**Post date:** [13 November 2020 09:28 UTC](https://discourse.nodered.org/t/local-gitlab-npm-register-as-node-source/35811/3 "2020-11-13T09:28:03Z")

</div>

Hello,  
thanks for the tutorial. First I implemented it exactly as you described it in the tutorial. That works very well :-). When integrating GitLab, however, I still failed because I couldn't get the data from package.json via the GitLab API. Maybe there is also a trick. But I still have to find out 😉  
Does anyone know whether GitLab can call up package.json from npm Packages?

---

<div class="post-metadata">

**Author:** ![NetHans](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nethans/32/2843_2.png) [@NetHans](https://discourse.nodered.org/u/NetHans)\
**Post date:** [20 November 2020 11:57 UTC](https://discourse.nodered.org/t/local-gitlab-npm-register-as-node-source/35811/4 "2020-11-20T11:57:44Z")

</div>

Hello

the connection of the local NPM registry via a GitLab server worked. However, after each update of my own nodes, I have to restart node-red again and again. With nodes from the official catalog, I haven't noticed this message after updates. I always get the following message.

Node-RED must be restarted to enable upgraded modules

Do nodes have to be configured separately so that node-red does not have to be restarted after an update?

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [20 November 2020 12:02 UTC](https://discourse.nodered.org/t/local-gitlab-npm-register-as-node-source/35811/5 "2020-11-20T12:02:40Z")

</div>

If you are installing a node for the first time, you don't have to restart.

But if you are upgrading an existing node, you must restart to complete the upgrade. That is true of all modules regardless of where they were installed from.

---

<div class="post-metadata">

**Author:** ![NetHans](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nethans/32/2843_2.png) [@NetHans](https://discourse.nodered.org/u/NetHans)\
**Post date:** [20 November 2020 12:13 UTC](https://discourse.nodered.org/t/local-gitlab-npm-register-as-node-source/35811/6 "2020-11-20T12:13:30Z")

</div>

Thanks for the clarification. Although I never noticed it with nodes from the official catalog.

Is there a way to restart Node-RED by itself? I installed Node-RED as a service on Windows.

---

<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:** [19 January 2021 12:13 UTC](https://discourse.nodered.org/t/local-gitlab-npm-register-as-node-source/35811/7 "2021-01-19T12:13:42Z")

</div>

Closed on 19 January 2021 12:13 UTC

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