Unable to install latest dashboard update

Hello

I tried to update the node red dashboard palette today as I noticed there was a new one released a few days ago. I got this error:


2021-09-21T14:13:23.442Z Install : node-red-dashboard 3.0.4

2021-09-21T14:13:22.974Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict node-red-dashboard@3.0.4
2021-09-21T14:13:24.128Z [err] npm
2021-09-21T14:13:24.128Z [err]
2021-09-21T14:13:24.128Z [err] WARN old lockfile
2021-09-21T14:13:24.128Z [err] npm
2021-09-21T14:13:24.128Z [err] WARN
2021-09-21T14:13:24.128Z [err] old lockfile The package-lock.json file was created with an old version of npm,
2021-09-21T14:13:24.128Z [err] npm
2021-09-21T14:13:24.128Z [err] WARN
2021-09-21T14:13:24.128Z [err] old lockfile so supplemental metadata must be fetched from the registry.
2021-09-21T14:13:24.128Z [err] npm
2021-09-21T14:13:24.128Z [err] WARN old lockfile
2021-09-21T14:13:24.128Z [err] npm WARN
2021-09-21T14:13:24.128Z [err] old lockfile This is a one-time fix-up, please be patient...
2021-09-21T14:13:24.128Z [err] npm
2021-09-21T14:13:24.128Z [err] WARN old lockfile
2021-09-21T14:13:24.129Z [err]
2021-09-21T14:14:02.685Z [err] npm
2021-09-21T14:14:02.685Z [err] ERR! code ERESOLVE
2021-09-21T14:14:02.688Z [err] npm ERR!
2021-09-21T14:14:02.688Z [err] ERESOLVE could not resolve
2021-09-21T14:14:02.688Z [err] npm ERR!
2021-09-21T14:14:02.688Z [err]
2021-09-21T14:14:02.688Z [err] npm
2021-09-21T14:14:02.688Z [err] ERR! While resolving: node-red-contrib-ui-led@0.4.9
2021-09-21T14:14:02.688Z [err] npm
2021-09-21T14:14:02.688Z [err] ERR! Found: node-red-dashboard@3.0.4
2021-09-21T14:14:02.688Z [err] npm ERR!
2021-09-21T14:14:02.688Z [err] node_modules/node-red-dashboard
2021-09-21T14:14:02.688Z [err] npm ERR!
2021-09-21T14:14:02.688Z [err] node-red-dashboard@"3.0.4" from the root project
2021-09-21T14:14:02.688Z [err] npm ERR!
2021-09-21T14:14:02.688Z [err]
2021-09-21T14:14:02.688Z [err] npm ERR!
2021-09-21T14:14:02.688Z [err] Could not resolve dependency:
2021-09-21T14:14:02.688Z [err] npm ERR!
2021-09-21T14:14:02.688Z [err] peer node-red-dashboard@"^2.23.3" from node-red-contrib-ui-led@0.4.9
2021-09-21T14:14:02.688Z [err] npm ERR!
2021-09-21T14:14:02.688Z [err] node_modules/node-red-contrib-ui-led
2021-09-21T14:14:02.688Z [err] npm ERR!
2021-09-21T14:14:02.688Z [err] node-red-contrib-ui-led@"~0.4.9" from the root project
2021-09-21T14:14:02.688Z [err] npm ERR!
2021-09-21T14:14:02.688Z [err]
2021-09-21T14:14:02.688Z [err] npm ERR!
2021-09-21T14:14:02.688Z [err] Conflicting peer dependency: node-red-dashboard@2.30.0
2021-09-21T14:14:02.688Z [err] npm ERR!
2021-09-21T14:14:02.688Z [err] node_modules/node-red-dashboard
2021-09-21T14:14:02.688Z [err] npm ERR!
2021-09-21T14:14:02.688Z [err] peer node-red-dashboard@"^2.23.3" from node-red-contrib-ui-led@0.4.9
2021-09-21T14:14:02.688Z [err] npm ERR!
2021-09-21T14:14:02.688Z [err] node_modules/node-red-contrib-ui-led
2021-09-21T14:14:02.688Z [err] npm ERR!
2021-09-21T14:14:02.688Z [err] node-red-contrib-ui-led@"~0.4.9" from the root project
2021-09-21T14:14:02.688Z [err] npm ERR!
2021-09-21T14:14:02.688Z [err]
2021-09-21T14:14:02.688Z [err] npm ERR!
2021-09-21T14:14:02.689Z [err] Fix the upstream dependency conflict, or retry
2021-09-21T14:14:02.689Z [err] npm ERR!
2021-09-21T14:14:02.689Z [err] this command with --force, or --legacy-peer-deps
2021-09-21T14:14:02.689Z [err] npm ERR!
2021-09-21T14:14:02.689Z [err] to accept an incorrect (and potentially broken) dependency resolution.
2021-09-21T14:14:02.689Z [err] npm ERR!
2021-09-21T14:14:02.689Z [err]
2021-09-21T14:14:02.689Z [err] npm ERR!

Any ideas why this is happening?

What versions do you have...

  • Nodejs
  • Npm
  • Node-red

Also, try deleting package-lock.json and try again.

If that doesn't sort it then delete the node-modules folder from your .node-red folder, and package-lock.json from there again and run
npm install
That will take a little time on a low power system.

I ran into this when I updated all the modules. For me, the problem was the ui-led widget. It has a hard dependency on the older version of Dashboard. And, after updating to the newer Dashboard, npm failed to run.

My solution was to rip out ui-led widget and make my own. After that, all was good.

Interesting. I got that warning when I installed 3.0.2 beta with npm install node-red-dashboard@next but everything still worked, including the led node.

It is only a peer dependency, so should only give warnings. Did you try installing it again after removing it? It installs ok for me (with a warning).

I tried everything I could think of for a couple hours, npm failed every time it hit it. After removing it, it was clean sailing. It was faster to whip up an led in css and get rid of the led module

1 Like

So after removing it, did you try re-installing?

fail

Truthfully, I did not. So, just now, I tried to add it back in and got the install failed error.

Like I said, it was the culprit

Could you go into your .node-red folder and install it manually and post the result here please. I would like to work out what is going on with this.
npm install node-red-contrib-ui-led

Here is the error from the console:

(Use `node --trace-warnings ...` to show where the warning was created)
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: node-red-project@0.0.1
npm ERR! Found: node-red-dashboard@3.0.4
npm ERR! node_modules/node-red-dashboard
npm ERR!   node-red-dashboard@"^3.0.4" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer node-red-dashboard@"^2.23.3" from node-red-contrib-ui-led@0.4.9
npm ERR! node_modules/node-red-contrib-ui-led
npm ERR!   node-red-contrib-ui-led@"0.4.9" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /home/nuc/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/nuc/.npm/_logs/2021-09-22T20_54_11_601Z-debug.log

22 Sep 13:54:11 - [warn] ------------------------------------------
Error: Install failed
    at /usr/local/lib/node_modules/node-red/node_modules/@node-red/registry/lib/installer.js:245:25
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
22 Sep 13:54:11 - [error] Error: Install failed

Sorry, could you do it from the command line please?

nuc@nuc-desktop:~/.node-red$ npm install node-red-contrib-ui-led
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: node-red-project@0.0.1
npm ERR! Found: node-red-dashboard@3.0.4
npm ERR! node_modules/node-red-dashboard
npm ERR!   node-red-dashboard@"^3.0.4" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer node-red-dashboard@"^2.23.3" from node-red-contrib-ui-led@0.4.9
npm ERR! node_modules/node-red-contrib-ui-led
npm ERR!   node-red-contrib-ui-led@"*" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /home/nuc/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/nuc/.npm/_logs/2021-09-22T21_02_42_524Z-debug.log
nuc@nuc-desktop:~/.node-red$ 




what version of npm do you have?

Run npm -v in a terminal

nuc@nuc-desktop:~/.node-red$ 
nuc@nuc-desktop:~/.node-red$ npm -v
7.21.1
nuc@nuc-desktop:~/.node-red$ 

Hmmm, there was an issue with earlier NPM V7.

Obviously this is contrary to the specified requirements of node-red-contrib-ui-led which clearly states it should be used with node-red-dashboard v^2.23.3 (as you can see here ) but you could always try the following...

  1. use npm install node-red-contrib-ui-led --legacy-peer-deps to install, and if this doesn't work use
  2. force method. add --force next to npm install: npm install node-red-contrib-ui-led --force
    (source)

NOTE: Sematic versioning ^2.23.3 means any of the V2.23.x or above versions (but less than V3.x) - see here...

I prefer KISS ... the ui-led was merely a convenience because it was there when needed at the time. It is easier to use a substitute than get into the dependency muck

I posted more so for awareness TBH (I did see your comment about "It was faster to whip up an led in css and get rid of the led module")

It would be good if you could raise an issue on the node-red-contrib-ui-led repo

On Linux with npm 6.14.12 the dashboard updated with warnings.

On a fresh install with npm 7.21.1 they turned into errors.
npm update node-red-dashboard didn't do anything (maybe because I'd done npm install node-red-dashboard@2.30.0 ?) but npm install --force node-red-dashboard@3.0.4 worked.

1 Like

Yeah, your scenario is what my scenario was. I was running a long time with outdated modules and npm, and upgraded and then it failed. I also tried --force and that worked. But, that did not seem like a long term solution