# Error Loading palette nodes after restart

**URL:** <https://discourse.nodered.org/t/error-loading-palette-nodes-after-restart/64837>\
**Category:** General\
**Created:** [8 July 2022 12:57 UTC](https://discourse.nodered.org/t/error-loading-palette-nodes-after-restart/64837 "2022-07-08T12:57:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gigonzalezs](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gigonzalezs/32/64365_2.png) [@gigonzalezs](https://discourse.nodered.org/u/gigonzalezs)\
**Post date:** [8 July 2022 12:57 UTC](https://discourse.nodered.org/t/error-loading-palette-nodes-after-restart/64837/1 "2022-07-08T12:57:59Z")

</div>

Hi, I'm using node-red inside a nodejs service. (node-red 2.2.2)

```auto
I use this code for restart the runtime:
RED.stop()
        .then(() => {
            RED.init(server,red_settings);
            return RED.start();
        })

```

throws this:

8 Jul 09:36:54 - [info] Stopping flows  
8 Jul 09:36:54 - [info] Stopped flows  
8 Jul 09:36:54 - [info]

# Welcome to Node-RED

8 Jul 09:36:54 - [info] Node-RED version: v2.2.2-git  
8 Jul 09:36:54 - [info] Node.js version: v16.14.2  
8 Jul 09:36:54 - [info] Darwin 21.4.0 arm64 LE  
8 Jul 09:36:54 - [info] Loading palette nodes  
ypeError: Cannot read properties of undefined (reading 'version')  
at Object.getModuleInfo (/service/node\_modules/@node-red/registry/lib/registry.js:378:44)  
at loadModuleFiles (/service/node\_modules/@node-red/registry/lib/loader.js:116:51)  
at load (/service/node\_modules/@node-red/registry/lib/loader.js:43:12)  
at process.processTicksAndRejections (node:internal/process/task\_queues:96:5)

thanks

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [8 July 2022 13:53 UTC](https://discourse.nodered.org/t/error-loading-palette-nodes-after-restart/64837/2 "2022-07-08T13:53:11Z")

</div>

I don't know much about running Node RED as an imbedded service.  
but should you be initing again?

maybe remove the init (since it was already done so at the start)

```auto
RED.stop()
        .then(() => {
            return RED.start();
        })

```

🤷‍♂️

---

<div class="post-metadata">

**Author:** ![gigonzalezs](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gigonzalezs/32/64365_2.png) [@gigonzalezs](https://discourse.nodered.org/u/gigonzalezs)\
**Post date:** [8 July 2022 22:22 UTC](https://discourse.nodered.org/t/error-loading-palette-nodes-after-restart/64837/3 "2022-07-08T22:22:54Z")

</div>

no difference when removing the RED.init();

Actually, I added the init() trying to fix the problem

---

<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:** [9 July 2022 09:41 UTC](https://discourse.nodered.org/t/error-loading-palette-nodes-after-restart/64837/4 "2022-07-09T09:41:05Z")

</div>

The runtime isn't designed to be stopped and restarted like that.

There's a long standing issue on the backlog to do the work to enable that, but as it isn't something the non-embedded version of Node-RED needs, it just hasn't had the attention needed.

---

<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:** [7 September 2022 09:41 UTC](https://discourse.nodered.org/t/error-loading-palette-nodes-after-restart/64837/5 "2022-09-07T09:41:39Z")

</div>

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