Installation of node modules like the dashboard is not possible (err EAI_AGAIN, docker)

hello
My node-red run in a container. with 192.168.1.232:1880 i can see it.
BUT if i try to install an new paket like the node red dashboard, it does not work.
the log means:

----------------------------------------------------------

2023-11-25T11:13:50.463Z Installieren : node-red-dashboard 3.6.1

2023-11-25T11:13:50.868Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict node-red-dashboard@3.6.1

2023-11-25T11:13:52.032Z [err] npm

2023-11-25T11:13:52.033Z [err] WARN

2023-11-25T11:13:52.034Z [err] config production Use `--omit=dev` instead.

2023-11-25T11:15:17.786Z [err] npm

2023-11-25T11:15:17.787Z [err] ERR! code

2023-11-25T11:15:17.787Z [err] EAI_AGAIN

2023-11-25T11:15:17.788Z [err] npm ERR! syscall getaddrinfo

2023-11-25T11:15:17.789Z [err] npm ERR!

2023-11-25T11:15:17.791Z [err] errno EAI_AGAIN

2023-11-25T11:15:17.804Z [err] npm ERR! request to https://registry.npmjs.org/node-red-dashboard failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org

2023-11-25T11:15:17.813Z [err]

2023-11-25T11:15:17.814Z [err] npm ERR!

2023-11-25T11:15:17.814Z [err] A complete log of this run can be found in:

2023-11-25T11:15:17.814Z [err] npm ERR! /data/.npm/_logs/2023-11-25T11_13_51_940Z-debug-0.log

2023-11-25T11:15:17.829Z rc=1

This means no internet connectivity. (Edit : it really means a DNS issue but for the sake of brevity, it's an interet issue)

And since it is a docker container, that's where you should start looking. (i.e. it's not a node-red issue)

Is there a reason you are using docker? If you are not familiar with docker or don't really need it, it can present difficulties you don't need!

YES it seams to bee a docker issue.
I try a lot of things wirs node red an if something goes wrong, i kill the container and rebulid.

So i have to find the error!
If someone has a good idea, please...

  1. Don't use Docker.
  2. If you must use docker then you need to find why the internet is not accessible from within the container.

that is not very helpful.

In fairness, you didnt answer:

It could very well be that you didnt know there was a non docker way of running Node-RED? It could be your "friend" told you to use docker or you read it somewhere! The truth is, not using docker is just what some people need to hear!

I would wager the majority of folk here do not use docker & lets not forget, this is a node-red forum :person_shrugging:

Typically, the folk on this forum are hugely helpful but this particular question has been asked (and answered sooooo many times, both on this forum and around the web).

1 Like

I have heard that is a pretty simple way to reset your Node-red development environment.
An alternative without Docker:

rm -rf ~/.node-red 
tar xf mylatestnoderedbackup.tar

What have you tried? Google found this which might be helpful.
devops - My docker container has no internet - Stack Overflow.

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