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
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 ?
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: