Error while installing dashboard on raspberry pi

2019-12-18T05:30:56.235Z Install : node-red-dashboard 2.19.2

2019-12-18T05:30:57.860Z npm install --no-audit --no-update-notifier --save --save-prefix="~" --production node-red-dashboard@2.19.2
2019-12-18T05:31:22.891Z [err] npm ERR! code EHOSTUNREACH
2019-12-18T05:31:22.891Z [err] npm
2019-12-18T05:31:22.895Z [err] ERR! errno EHOSTUNREACH
2019-12-18T05:31:22.913Z [err] npm ERR! request to https://registry.npmjs.org/node-red-dashboard failed, reason: connect EHOSTUNREACH 104.16.23.35:443
2019-12-18T05:31:22.989Z [err]
2019-12-18T05:31:22.989Z [err] npm ERR! A complete log of this run can be found in:
2019-12-18T05:31:22.989Z [err] npm ERR! /home/pi/.npm/_logs/2019-12-18T05_31_22_935Z-debug.log
2019-12-18T05:31:23.027Z rc=1

As the error highlights, your machine cant reach the npm server currently. You need to check your internet connection and retry.