Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting errors trying to update Node-red-contrib-bigtimer and node-red-contrib-home-assistant-websocket #389

Closed
Robert126 opened this issue Sep 13, 2023 · 13 comments

Comments

@Robert126
Copy link

Robert126 commented Sep 13, 2023

On my Node Red installation, I have the following Palette installed:
node-red 3.1.0
Node-red-contrib-bigtimer 0.50.0
node-red-contrib-home-assistant-websocket 3.5.0

I would like to update the last two
Node-red-contrib-bigtimer 0.50.0 >> 0.56.1
node-red-contrib-home-assistant-websocket 3.5.0 >> 3.6.0

But I am getting the following errors back. See log files.

My environment is:
Proxmox 8.0.4
LXC container
My Node Red installation is inside a docker container.

My docker-compose.yaml files looks like this:

  nodered:
    container_name: nodered
    image: nodered/node-red:latest
    restart: unless-stopped
    ports:
      - 1880:1880
    environment:
      - TZ=Europe/Amsterdam
    volumes:
      - /opt/nodered/data:/data
    depends_on:
#      - homeassistant
      - mosquitto

Log files:

-----------------------------------------------------------
2023-09-13T18:29:08.262Z Install : node-red-contrib-home-assistant-websocket 0.56.1

2023-09-13T18:29:08.320Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict node-red-contrib-home-assistant-websocket@0.56.1
2023-09-13T18:29:08.795Z [err] npm
2023-09-13T18:29:08.795Z [err]  WARN config production Use `--omit=dev` instead.
2023-09-13T18:30:19.690Z [err] npm
2023-09-13T18:30:19.690Z [err]  ERR! code ETARGET
2023-09-13T18:30:19.694Z [err] npm ERR! notarget No matching version found for node-red-contrib-home-assistant-websocket@0.56.1.
2023-09-13T18:30:19.694Z [err] npm ERR!
2023-09-13T18:30:19.694Z [err]  notarget In most cases you or one of your dependencies are requesting
2023-09-13T18:30:19.694Z [err] npm ERR! notarget a package version that doesn't exist.
2023-09-13T18:30:19.697Z [err] 
2023-09-13T18:30:19.697Z [err] npm ERR! A complete log of this run can be found in:
2023-09-13T18:30:19.697Z [err] npm ERR!     /data/.npm/_logs/2023-09-13T18_29_08_761Z-debug-0.log
2023-09-13T18:30:19.713Z rc=1

-----------------------------------------------------------
2023-09-13T18:31:00.387Z Install : node-red-dashboard 3.6.0

2023-09-13T18:31:00.432Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict node-red-dashboard@3.6.0
2023-09-13T18:31:00.949Z [err] npm
2023-09-13T18:31:00.953Z [err]  WARN config production Use `--omit=dev` instead.
2023-09-13T18:32:11.674Z [err] npm
2023-09-13T18:32:11.674Z [err]  ERR! code ETARGET
2023-09-13T18:32:11.677Z [err] npm ERR! notarget No matching version found for node-red-dashboard@3.6.0.
2023-09-13T18:32:11.677Z [err] npm
2023-09-13T18:32:11.677Z [err]  ERR! notarget In most cases you or one of your dependencies are requesting
2023-09-13T18:32:11.677Z [err] npm ERR! notarget a package version that doesn't exist.
2023-09-13T18:32:11.679Z [err] 
2023-09-13T18:32:11.679Z [err] npm ERR! A complete log of this run can be found in:
2023-09-13T18:32:11.680Z [err] npm ERR!     /data/.npm/_logs/2023-09-13T18_31_00_909Z-debug-0.log
2023-09-13T18:32:11.687Z rc=1

Hopefully, someone can help out?

Kind regards,
Robert

@knolleary
Copy link
Member

Those are strange errors to be hitting. They are both claims that npm cannot find a module at a specific level in the registry. But a quick search now shows those versions both exist and are installable.

I wonder if this is a networking issue from inside the container. Are you able to get a shell inside the container and try to manually install either of those modules?

@Robert126
Copy link
Author

Robert126 commented Sep 13, 2023

I can log in to the shell with in the container.
the file structure is /opt/nodered/data

I also deleted all containers and reinstalled them:
docker-compose down
docker system prune -a
docker-compose pull
docker-compose up -d

And I can ping a public website from here.

Can you advise what you what to do?

@Robert126
Copy link
Author

I just found that it is a general problem.

zachowj/node-red-contrib-home-assistant-websocket#898
The issue seems to be not solved.

I adapted my docker-compsoe.yaml file and changed
But still receiving the same errors.

When I down graded the Node Red version, I m getting the following errors

docker logs nodered
13 Sep 21:29:47 - [info] 

Welcome to Node-RED
===================

13 Sep 21:29:47 - [info] Node-RED version: v3.0.2
13 Sep 21:29:47 - [info] Node.js  version: v16.20.1
13 Sep 21:29:47 - [info] Linux 6.2.16-12-pve x64 LE
13 Sep 21:29:48 - [info] Loading palette nodes
13 Sep 21:29:49 - [info] Dashboard version 3.5.0 started at /ui
13 Sep 21:29:49 - [info] Settings file  : /data/settings.js
13 Sep 21:29:49 - [info] Context store  : 'default' [module=memory]
13 Sep 21:29:49 - [info] User directory : /data
13 Sep 21:29:49 - [warn] Projects disabled : editorTheme.projects.enabled=false
13 Sep 21:29:49 - [info] Flows file     : /data/flows.json
13 Sep 21:29:49 - [info] Server now running at http://127.0.0.1:1880/
13 Sep 21:29:49 - [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.
---------------------------------------------------------------------

13 Sep 21:29:49 - [info] Starting flows
13 Sep 21:29:49 - [info] Started flows
13 Sep 21:29:49 - [info] [server:Home Assistant] Connecting to http://***.***.***.***:8123
13 Sep 21:29:49 - [info] [mqtt-broker:mqtt] Connected to broker: mqtt://***.***.***.***:1883
13 Sep 21:29:49 - [info] [server:Home Assistant] Connected to http://***.***.***.***:8123
13 Sep 21:31:08 - [info] Upgrading module: node-red-contrib-home-assistant-websocket to version: 0.56.1
13 Sep 21:32:19 - [warn] Installation of module node-red-contrib-home-assistant-websocket failed:
13 Sep 21:32:19 - [warn] ------------------------------------------
13 Sep 21:32:19 - [warn] npm WARN config production Use `--omit=dev` instead.
npm ERR! code ETARGET
npm ERR! notarget No matching version found for node-red-contrib-home-assistant-websocket@0.56.1.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

npm ERR! A complete log of this run can be found in:
npm ERR!     /data/.npm/_logs/2023-09-13T19_31_08_521Z-debug-0.log

13 Sep 21:32:19 - [warn] ------------------------------------------
Error: Install failed
    at /usr/src/node-red/node_modules/@node-red/registry/lib/installer.js:285:25
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
13 Sep 21:32:19 - [error] Error: Install failed
13 Sep 21:33:32 - [info] Stopping flows
13 Sep 21:33:32 - [info] [server:Home Assistant] Closing connection to http://***.***.***.***:8123
13 Sep 21:33:32 - [info] Stopped flows
13 Sep 21:33:42 - [info] 

Welcome to Node-RED
===================

13 Sep 21:33:42 - [info] Node-RED version: v3.0.2
13 Sep 21:33:42 - [info] Node.js  version: v16.20.1
13 Sep 21:33:42 - [info] Linux 6.2.16-12-pve x64 LE
13 Sep 21:33:43 - [info] Loading palette nodes
13 Sep 21:33:45 - [info] Dashboard version 3.5.0 started at /ui
13 Sep 21:33:45 - [info] Settings file  : /data/settings.js
13 Sep 21:33:45 - [info] Context store  : 'default' [module=memory]
13 Sep 21:33:45 - [info] User directory : /data
13 Sep 21:33:45 - [warn] Projects disabled : editorTheme.projects.enabled=false
13 Sep 21:33:45 - [info] Flows file     : /data/flows.json
13 Sep 21:33:45 - [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.
---------------------------------------------------------------------

13 Sep 21:33:45 - [info] Server now running at http://127.0.0.1:1880/
13 Sep 21:33:45 - [info] Starting flows
13 Sep 21:33:45 - [info] Started flows
13 Sep 21:33:45 - [info] [server:Home Assistant] Connecting to http://***.***.***.***:8123
13 Sep 21:33:45 - [info] [mqtt-broker:mqtt] Connected to broker: mqtt://***.***.***.***:1883
13 Sep 21:33:45 - [info] [server:Home Assistant] Connected to http://***.***.***.***:8123
13 Sep 21:35:05 - [info] Upgrading module: node-red-dashboard to version: 3.6.0
13 Sep 21:36:16 - [warn] Installation of module node-red-dashboard failed:
13 Sep 21:36:16 - [warn] ------------------------------------------
13 Sep 21:36:16 - [warn] npm WARN config production Use `--omit=dev` instead.
npm ERR! code ETARGET
npm ERR! notarget No matching version found for node-red-dashboard@3.6.0.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

npm ERR! A complete log of this run can be found in:
npm ERR!     /data/.npm/_logs/2023-09-13T19_35_05_895Z-debug-0.log

13 Sep 21:36:16 - [warn] ------------------------------------------
Error: Install failed
    at /usr/src/node-red/node_modules/@node-red/registry/lib/installer.js:285:25
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
13 Sep 21:36:16 - [error] Error: Install failed

@Robert126
Copy link
Author

As advised, I downgrade and changed my docker-compose.yaml
But I am still getting the errors
Please advice?

docker logs nodered
13 Sep 21:29:47 - [info] 

Welcome to Node-RED
===================

13 Sep 21:29:47 - [info] Node-RED version: v3.0.2
13 Sep 21:29:47 - [info] Node.js  version: v16.20.1
13 Sep 21:29:47 - [info] Linux 6.2.16-12-pve x64 LE
13 Sep 21:29:48 - [info] Loading palette nodes
13 Sep 21:29:49 - [info] Dashboard version 3.5.0 started at /ui
13 Sep 21:29:49 - [info] Settings file  : /data/settings.js
13 Sep 21:29:49 - [info] Context store  : 'default' [module=memory]
13 Sep 21:29:49 - [info] User directory : /data
13 Sep 21:29:49 - [warn] Projects disabled : editorTheme.projects.enabled=false
13 Sep 21:29:49 - [info] Flows file     : /data/flows.json
13 Sep 21:29:49 - [info] Server now running at http://127.0.0.1:1880/
13 Sep 21:29:49 - [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.
---------------------------------------------------------------------

13 Sep 21:29:49 - [info] Starting flows
13 Sep 21:29:49 - [info] Started flows
13 Sep 21:29:49 - [info] [server:Home Assistant] Connecting to http://*.*.*.*
13 Sep 21:29:49 - [info] [mqtt-broker:mqtt] Connected to broker: mqtt://*.*.*.*
13 Sep 21:29:49 - [info] [server:Home Assistant] Connected to http://*.*.*.*
13 Sep 21:31:08 - [info] Upgrading module: node-red-contrib-home-assistant-websocket to version: 0.56.1
13 Sep 21:32:19 - [warn] Installation of module node-red-contrib-home-assistant-websocket failed:
13 Sep 21:32:19 - [warn] ------------------------------------------
13 Sep 21:32:19 - [warn] npm WARN config production Use `--omit=dev` instead.
npm ERR! code ETARGET
npm ERR! notarget No matching version found for node-red-contrib-home-assistant-websocket@0.56.1.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

npm ERR! A complete log of this run can be found in:
npm ERR!     /data/.npm/_logs/2023-09-13T19_31_08_521Z-debug-0.log

13 Sep 21:32:19 - [warn] ------------------------------------------
Error: Install failed
    at /usr/src/node-red/node_modules/@node-red/registry/lib/installer.js:285:25
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
13 Sep 21:32:19 - [error] Error: Install failed
13 Sep 21:33:32 - [info] Stopping flows
13 Sep 21:33:32 - [info] [server:Home Assistant] Closing connection to http://*.*.*.*
13 Sep 21:33:32 - [info] Stopped flows
13 Sep 21:33:42 - [info] 

Welcome to Node-RED
===================

13 Sep 21:33:42 - [info] Node-RED version: v3.0.2
13 Sep 21:33:42 - [info] Node.js  version: v16.20.1
13 Sep 21:33:42 - [info] Linux 6.2.16-12-pve x64 LE
13 Sep 21:33:43 - [info] Loading palette nodes
13 Sep 21:33:45 - [info] Dashboard version 3.5.0 started at /ui
13 Sep 21:33:45 - [info] Settings file  : /data/settings.js
13 Sep 21:33:45 - [info] Context store  : 'default' [module=memory]
13 Sep 21:33:45 - [info] User directory : /data
13 Sep 21:33:45 - [warn] Projects disabled : editorTheme.projects.enabled=false
13 Sep 21:33:45 - [info] Flows file     : /data/flows.json
13 Sep 21:33:45 - [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.
---------------------------------------------------------------------

13 Sep 21:33:45 - [info] Server now running at http://*.*.*.*
13 Sep 21:33:45 - [info] Starting flows
13 Sep 21:33:45 - [info] Started flows
13 Sep 21:33:45 - [info] [server:Home Assistant] Connecting to http://*.*.*.*
13 Sep 21:33:45 - [info] [mqtt-broker:mqtt] Connected to broker: mqtt://*.*.*.*
13 Sep 21:33:45 - [info] [server:Home Assistant] Connected to http://*.*.*.*
13 Sep 21:35:05 - [info] Upgrading module: node-red-dashboard to version: 3.6.0
13 Sep 21:36:16 - [warn] Installation of module node-red-dashboard failed:
13 Sep 21:36:16 - [warn] ------------------------------------------
13 Sep 21:36:16 - [warn] npm WARN config production Use `--omit=dev` instead.
npm ERR! code ETARGET
npm ERR! notarget No matching version found for node-red-dashboard@3.6.0.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

npm ERR! A complete log of this run can be found in:
npm ERR!     /data/.npm/_logs/2023-09-13T19_35_05_895Z-debug-0.log

13 Sep 21:36:16 - [warn] ------------------------------------------
Error: Install failed
    at /usr/src/node-red/node_modules/@node-red/registry/lib/installer.js:285:25
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
13 Sep 21:36:16 - [error] Error: Install failed
13 Sep 22:02:14 - [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.
---------------------------------------------------------------------

13 Sep 22:02:14 - [info] Stopping flows
13 Sep 22:02:14 - [info] [server:Home Assistant] Closing connection to http://*.*.*.*
13 Sep 22:02:14 - [info] Stopped flows
13 Sep 22:02:14 - [info] Starting flows
13 Sep 22:02:14 - [info] Started flows
13 Sep 22:02:14 - [info] [server:Home Assistant] Connecting to http://*.*.*.*
13 Sep 22:02:14 - [info] [mqtt-broker:mqtt] Connected to broker: mqtt://*.*.*.*
13 Sep 22:02:14 - [info] [server:Home Assistant] Connected to http://*.*.*.*

@hardillb
Copy link
Member

Are you behind a HTTP proxy? Is there anything that may be intercepting/changing http requests to https://registry.npmjs.org?

@Robert126
Copy link
Author

Robert126 commented Sep 14, 2023

No, I am not behind a HTTP proxy

I can pin g any public website

@hardillb
Copy link
Member

The errors are explicitly the result of npmjs.org saying the version doesn't exist, unless there is an intermittent error at npmjs.org I am not sure what the problem could be.

I have tried installing those nodes into the standard NR container without error.

@Robert126
Copy link
Author

Robert126 commented Sep 14, 2023

Every thing was working perfectly before updating my system

It even blocks to install another palette in Node red

2023-09-14T15:43:23.318Z Install : node-red-contrib-telegrambot 15.1.6

2023-09-14T15:43:23.336Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict node-red-contrib-telegrambot@15.1.6
2023-09-14T15:43:23.824Z [err] npm
2023-09-14T15:43:23.824Z [err]  WARN
2023-09-14T15:43:23.824Z [err]  config production Use `--omit=dev` instead.
2023-09-14T15:44:34.306Z [err] npm
2023-09-14T15:44:34.306Z [err]  ERR! code
2023-09-14T15:44:34.306Z [err]  DEPTH_ZERO_SELF_SIGNED_CERT
2023-09-14T15:44:34.306Z [err] npm ERR!
2023-09-14T15:44:34.306Z [err]  errno DEPTH_ZERO_SELF_SIGNED_CERT
2023-09-14T15:44:34.308Z [err] npm 
2023-09-14T15:44:34.308Z [err] ERR!
2023-09-14T15:44:34.308Z [err]  request to https://registry.npmjs.org/node-red-contrib-telegrambot failed, reason: self signed certificate
2023-09-14T15:44:34.311Z [err] 
2023-09-14T15:44:34.311Z [err] npm ERR! A complete log of this run can be found in:
2023-09-14T15:44:34.311Z [err] npm ERR!     /data/.npm/_logs/2023-09-14T15_43_23_786Z-debug-0.log
2023-09-14T15:44:34.321Z rc=1

@hardillb
Copy link
Member

What did you change apart from the Node-RED container version? Is there a .npmrc file in /data?

@hardillb
Copy link
Member

hardillb commented Sep 14, 2023

There IS a proxy (or something else) in the way:

request to https://registry.npmjs.org/node-red-contrib-telegrambot failed, reason: self signed certificate

Means that something is between you and the registry.npmjs.org machine that is pretending to be that machine.

@Robert126
Copy link
Author

Interesting, do you have an idea how I can find it? Or solve the issue?

@hardillb
Copy link
Member

Not without full access to your system to dig around. Things I would look at would be

  1. Check the DNS on the host machine is pointing at what you expect
  2. Check what other containers are running in the same docker network
  3. What happens if you try and install those nodes in another fresh container (both Node-RED and just a NodeJS container)

@hardillb
Copy link
Member

I'm going to close this as it's been over 6 months and the errors are definitely local network related.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants