Error install dashboard

Hi all
I am trying to install dashboard from Node Red on raspberry pi 4
and I get the message
gideon@raspberrypi:~ $ npm i node-red-dashboard
npm ERR! code FETCH_ERROR
npm ERR! errno FETCH_ERROR
npm ERR! invalid json response body at https://registry.npmjs.org/engine.io reason: Unexpected end of JSON input

npm ERR! A complete log of this run can be found in:
npm ERR! /home/gideon/.npm/_logs/2022-08-08T10_15_46_467Z-debug.log

any one can help me?

Hi can you consider updating the npm and try?

How did you install node red? Did you use the recommended script in the node red docs?

didn't help

witch script?
I try to install the dashboard from the NR and from shell and it is the same

Please check if this could be of any help -- https://discourse.nodered.org/t/problem-installing-node-red-dashboard/26192

Google for
Install node red pi
And go to the one on nodered.org

From the error you posted. a) you aren’t in the user node-red directory. Usually ~/.node-red. b) it seems to be failing to get the package from the npm site. Is your internet connection stable ? Not via a proxy etc ?

Thanks
the internet connection is stable but weak.
I try to install from the NR > manage > palette so I think the directory is ok

I try this to
ideon@raspberrypi:/usr/lib $ npm install node-red-dashboard
npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning EAI_AGAIN: request to https://registry.npmjs.org/node-red-dashboard failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org
npm WARN registry Using stale data from https://registry.npmjs.org/ due to a request error during revalidation.
npm ERR! code FETCH_ERROR
npm ERR! errno FETCH_ERROR
npm ERR! invalid json response body at https://registry.npmjs.org/engine.io reason: Unexpected end of JSON input

npm ERR! A complete log of this run can be found in:
npm ERR! /home/gideon/.npm/_logs/2022-08-10T11_34_26_107Z-debug.log
gideon@raspberrypi:/usr/lib $

You have shown us
gideon@raspberrypi:~ $ npm i node-red-dashboard
and
gideon@raspberrypi:/usr/lib $ npm install node-red-dashboard

Neither of those are correct, it should be

cd ~/.node-red
npm install node-red-dashboard

But that doesn't explain EAI_AGAIN or FETCH_ERROR

thanks that the err I get now

gideon@raspberrypi:~ $ cd ~/.node-red
npm install node-red-dashboard
npm ERR! code FETCH_ERROR
npm ERR! errno FETCH_ERROR
npm ERR! invalid json response body at https://registry.npmjs.org/engine.io reason: Unexpected end of JSON input

npm ERR! A complete log of this run can be found in:
npm ERR! /home/gideon/.npm/_logs/2022-08-10T12_15_15_104Z-debug.log
gideon@raspberrypi:~/.node-red $

If you do a google search on npm ERR! code FETCH_ERROR you will find that this is generally happens when your network is not stable and cannot connect to the NPM servers properly.
Here is a website with directions on what to do to fix the issue:

hi
thanksssssssssssssss
It solved the error by running the
npm cache clean --force
And after that I installed the dashboard.
Thanks .....

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