15 May 03:37:05 - [info] Server now running at http://127.0.0.1:1880/
15 May 03:37:05 - [info] Starting flows
15 May 03:37:05 - [info] Started flows
15 May 03:37:54 - [info] Installing module: node-red-dashboard, version: 3.1.7
15 May 03:37:59 - [warn] Installation of module node-red-dashboard failed:
15 May 03:37:59 - [warn] ------------------------------------------
15 May 03:37:59 - [warn] npm ERR! code EINVALIDTAGNAME
npm ERR! Invalid tag name ""~"5.21.2": Tags may not have any characters that encodeURIComponent encodes.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2022-05-14T19_37_55_635Z-debug-0.log
15 May 03:37:59 - [warn] ------------------------------------------
Error: Install failed
at /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/installer.js:285:25
at processTicksAndRejections (node:internal/process/task_queues:96:5)
15 May 03:37:59 - [error] Error: Install failed
You did not run this in the right directory - you should be in the .node-red directory.
But you will hit the same error when you try.
What version of Node-RED are you using? There was a bug in an 2.something release that caused the issue you are hitting.
You need to edit the file ~/.node-red/package.json, look in the dependencies section for an entry like "\"~\"5.21.2". Edit it to get rid of the extra quotes: "~5.21.2"
You should find the installs work again.
If not, please share the contents of package.json so we can see if any further fixes are needed.
I have since tried installing the dashboard from the node-red directory, and it can be confirmed now that the error returned are the same.
pi@raspberrypi:~/.node-red $ npm i node-red-dashboard
npm ERR! code EINVALIDTAGNAME
npm ERR! Invalid tag name ""~"5.21.2": Tags may not have any characters that encodeURIComponent encodes.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2022-05-14T22_04_45_749Z-debug-0.log