# Unknown issue. I was asked to report this

**URL:** <https://discourse.nodered.org/t/unknown-issue-i-was-asked-to-report-this/86008>\
**Category:** General\
**Created:** [28 February 2024 18:00 UTC](https://discourse.nodered.org/t/unknown-issue-i-was-asked-to-report-this/86008 "2024-02-28T18:00:31Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lebo](https://avatars.discourse-cdn.com/v4/letter/l/58f4c7/32.png) [@Lebo](https://discourse.nodered.org/u/Lebo)\
**Post date:** [28 February 2024 18:00 UTC](https://discourse.nodered.org/t/unknown-issue-i-was-asked-to-report-this/86008/1 "2024-02-28T18:00:31Z")

</div>

* * *

Unexpected Node Error

* * *

Info:  
Node object is not a node-red Node  
Stack:  
TypeError: Cannot read property 'length' of undefined  
at TimeSchedulerNode.Node.close (/usr/lib/node\_modules/node-red/node\_modules/@node-red/runtime/lib/nodes/Node.js:319:41)  
at stopNode (/usr/lib/node\_modules/node-red/node\_modules/@node-red/runtime/lib/flows/Flow.js:746:31)  
at Flow.stop (/usr/lib/node\_modules/node-red/node\_modules/@node-red/runtime/lib/flows/Flow.js:388:35)  
at /usr/lib/node\_modules/node-red/node\_modules/@node-red/runtime/lib/flows/index.js:482:43  
at Array.forEach ()  
at stop (/usr/lib/node\_modules/node-red/node\_modules/@node-red/runtime/lib/flows/index.js:478:19)  
at /usr/lib/node\_modules/node-red/node\_modules/@node-red/runtime/lib/flows/index.js:220:20

Please report this issue, including the information logged above:  
https..

---

<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:** [28 February 2024 18:11 UTC](https://discourse.nodered.org/t/unknown-issue-i-was-asked-to-report-this/86008/2 "2024-02-28T18:11:13Z")

</div>

Thanks for reporting, but we need some context.

- What nodes do you have installed (check your `package.json` file in `~/.node-red`)
- Version of Node RED
- Version of Node
- OS
- Full Node RED start up log

---

<div class="post-metadata">

**Author:** ![Lebo](https://avatars.discourse-cdn.com/v4/letter/l/58f4c7/32.png) [@Lebo](https://discourse.nodered.org/u/Lebo)\
**Post date:** [28 February 2024 19:45 UTC](https://discourse.nodered.org/t/unknown-issue-i-was-asked-to-report-this/86008/3 "2024-02-28T19:45:55Z")

</div>

Startup log:  
28 Feb 20:38:25 - [info]

# Welcome to Node-RED

28 Feb 20:38:25 - [info] Node-RED version: v3.1.5  
28 Feb 20:38:25 - [info] Node.js version: v20.11.1  
28 Feb 20:38:25 - [info] Linux 6.1.21-v8+ arm64 LE  
28 Feb 20:38:26 - [info] Loading palette nodes  
28 Feb 20:38:27 - [info] Dashboard version 1.0.2 started at /ui  
28 Feb 20:38:29 - [warn] ------------------------------------------------------  
28 Feb 20:38:29 - [warn] [node-red-contrib-moment2/moment] 'moment' already registered by module node-red-contrib-moment  
28 Feb 20:38:29 - [warn] ------------------------------------------------------  
28 Feb 20:38:29 - [info] Settings file : /home/lennart/.node-red/settings.js  
28 Feb 20:38:29 - [info] Context store : 'default' [module=memory]  
28 Feb 20:38:29 - [info] User directory : /home/lennart/.node-red  
28 Feb 20:38:29 - [warn] Projects disabled : editorTheme.projects.enabled=false  
28 Feb 20:38:29 - [info] Flows file : /home/lennart/.node-red/start  
28 Feb 20:38:29 - [info] Creating new flow file  
28 Feb 20:38:29 - [warn]

* * *

Your flow credentials file is encrypted using a system-generated key.

If the system-generated key is lost for any reason, your credentials  
file will not be recoverable, you will have to delete it and re-enter  
your credentials.

## You should set your own key using the 'credentialSecret' option in your settings file. Node-RED will then re-encrypt your credentials file using your chosen key the next time you deploy a change.

28 Feb 20:38:29 - [warn] Encrypted credentials not found  
28 Feb 20:38:29 - [error] Unable to listen on [http://127.0.0.1:1880/](http://127.0.0.1:1880/)  
28 Feb 20:38:29 - [error] Error: port in use

---

<div class="post-metadata">

**Author:** ![Lebo](https://avatars.discourse-cdn.com/v4/letter/l/58f4c7/32.png) [@Lebo](https://discourse.nodered.org/u/Lebo)\
**Post date:** [28 February 2024 20:01 UTC](https://discourse.nodered.org/t/unknown-issue-i-was-asked-to-report-this/86008/4 "2024-02-28T20:01:32Z")

</div>

The error turned up after upgrading nodes.js

I do not know how to list all nodes used, it is 20

---

<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:** [28 February 2024 20:30 UTC](https://discourse.nodered.org/t/unknown-issue-i-was-asked-to-report-this/86008/5 "2024-02-28T20:30:13Z")

</div>

> [@Lebo](#):
>
> The error turned up after upgrading nodes.js

That probably explains it. After upgrading nodejs it is necessary to rebuild modules that have compiled components. If you are on a Debian based system (such as Ubuntu or Pi OS) the easiest way to do that is to re-run the install script from [Running on Raspberry Pi : Node-RED](https://nodered.org/docs/getting-started/raspberrypi)

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [28 February 2024 21:06 UTC](https://discourse.nodered.org/t/unknown-issue-i-was-asked-to-report-this/86008/6 "2024-02-28T21:06:53Z")

</div>

> [@Lebo](#):
>
> 28 Feb 20:38:29 - [warn] [node-red-contrib-moment2/moment] 'moment' already registered by module node-red-contrib-moment

I don't think this is related to the problem you've reported. However, you have 2 nodes installed that have clashing names. The original moment node written by me that has a full readme and was updated a few months ago and a copy written by someone else that has no readme so it isn't clear what it is for and hasn't been updated in 8 years.

---

<div class="post-metadata">

**Author:** ![Lebo](https://avatars.discourse-cdn.com/v4/letter/l/58f4c7/32.png) [@Lebo](https://discourse.nodered.org/u/Lebo)\
**Post date:** [28 February 2024 21:30 UTC](https://discourse.nodered.org/t/unknown-issue-i-was-asked-to-report-this/86008/7 "2024-02-28T21:30:52Z")

</div>

Here is the package.json file  
"name": "node-red-project",  
"description": "initially created for you by Node-RED 2.2.2 ",  
"version": "0.0.1",  
"private": true,  
"dependencies": {  
"dashboard-evi": "~1.0.2",  
"node-red-contrib-buffer-parser": "^3.2.2",  
"node-red-contrib-moment": "~5.0.0",  
"node-red-contrib-moment2": "~1.0.5",  
"node-red-contrib-mssql": "0.0.7",  
"node-red-contrib-ownet": "~0.1.5",  
"node-red-contrib-persist": "~1.1.1",  
"node-red-contrib-play-audio": "^2.5.0",  
"node-red-contrib-timerswitch": "~1.4.0",  
"node-red-contrib-ui-artless-gauge": "~0.3.12",  
"node-red-contrib-ui-time-scheduler-italian": "~1.17.8",  
"node-red-node-email": "~1.18.2",  
"node-red-node-pi-gpio": "^2.0.6",  
"node-red-node-ping": "^0.3.3",  
"node-red-node-random": "^0.4.1",  
"node-red-node-serialport": "^2.0.2",  
"node-red-node-smooth": "^0.1.2",  
"nodered-contrib-sms77": "~3.2.2"

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [28 February 2024 21:33 UTC](https://discourse.nodered.org/t/unknown-issue-i-was-asked-to-report-this/86008/8 "2024-02-28T21:33:23Z")

</div>

As I say, get rid of moment2 and then follow Colin's guidance and do:

```auto
cd ~/.node-red
npm rebuild

```

Then restart and see if that helps.

---

<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:** [28 February 2024 21:53 UTC](https://discourse.nodered.org/t/unknown-issue-i-was-asked-to-report-this/86008/9 "2024-02-28T21:53:00Z")

</div>

> [@TotallyInformation](#):
>
> `npm rebuild`

I believe the script will do that for you.

> [@Lebo](#):
>
> "dashboard-evi": "~1.0.2",

I think that dashboard may well not be compatible with node-red-contrib-ui-artless-gauge. Unless you have a good reason for using it I recommend the dashboard usually used which is node-red-dashboard.

---

<div class="post-metadata">

**Author:** ![Lebo](https://avatars.discourse-cdn.com/v4/letter/l/58f4c7/32.png) [@Lebo](https://discourse.nodered.org/u/Lebo)\
**Post date:** [28 February 2024 22:35 UTC](https://discourse.nodered.org/t/unknown-issue-i-was-asked-to-report-this/86008/10 "2024-02-28T22:35:34Z")

</div>

I have finally got rid of the error. But I did not manage to un-install Moment 2. It is claimed to be in use even after deleting it from the flow where I used it.  
Thanks for your help!

---

<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:** [29 February 2024 08:56 UTC](https://discourse.nodered.org/t/unknown-issue-i-was-asked-to-report-this/86008/11 "2024-02-29T08:56:40Z")

</div>

> [@Lebo](#):
>
> I did not manage to un-install Moment 2

In a command window go into the .node-red folder and run  
`npm remove node-red-contrib-moment2`  
then restart node-red.

---

<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:** [29 May 2024 08:56 UTC](https://discourse.nodered.org/t/unknown-issue-i-was-asked-to-report-this/86008/12 "2024-05-29T08:56:49Z")

</div>

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