ERESOLVE error when trying to remove a contrib node

Whenever I try to update or remove a contrib node I get a ERESOLVE error that relates to the node...
I was unable to remove this node, using Manage palette or npm on the command-line, so I delete the directory. I tried doing a 'npm rebuild' but still get this issue.
Has anyone any suggestions on how to rectify this situation?

2023-01-23T10:08:59.188Z Remove : node-red-contrib-buffer-parser

2023-01-23T10:08:59.368Z npm remove --no-audit --no-update-notifier --no-fund --save node-red-contrib-buffer-parser
2023-01-23T10:09:06.504Z [err] npm
2023-01-23T10:09:06.505Z [err] ERR! code ERESOLVE
2023-01-23T10:09:06.513Z [err] npm
2023-01-23T10:09:06.514Z [err] ERR! ERESOLVE could not resolve
2023-01-23T10:09:06.514Z [err] npm
2023-01-23T10:09:06.514Z [err] ERR!
2023-01-23T10:09:06.515Z [err] npm
2023-01-23T10:09:06.515Z [err] ERR! While resolving: node-red-contrib-ui-mp4frag@0.1.0
2023-01-23T10:09:06.515Z [err] npm
2023-01-23T10:09:06.515Z [err] ERR!
2023-01-23T10:09:06.516Z [err] Found: node-red-dashboard@3.2.0
2023-01-23T10:09:06.516Z [err] npm ERR! node_modules/node-red-dashboard
2023-01-23T10:09:06.516Z [err] npm ERR! peer node-red-dashboard@">=2.23.3" from node-red-contrib-ui-led@0.4.11
2023-01-23T10:09:06.516Z [err] npm ERR! node_modules/node-red-contrib-ui-led
2023-01-23T10:09:06.516Z [err] npm ERR! node-red-contrib-ui-led@"~0.4.11" from the root project
2023-01-23T10:09:06.516Z [err] npm ERR! peer node-red-dashboard@">2.15.0" from node-red-node-ui-iframe@0.2.1
2023-01-23T10:09:06.516Z [err] npm ERR! node_modules/node-red-node-ui-iframe
2023-01-23T10:09:06.516Z [err] npm ERR! node-red-node-ui-iframe@"~0.2.1" from the root project
2023-01-23T10:09:06.516Z [err] npm ERR! 3 more (node-red-node-ui-list, node-red-node-ui-table, the root project)
2023-01-23T10:09:06.516Z [err] npm ERR!

Hi Dave,

Easiest way is to stop Node-RED, manually remove using a command line on the server:

cd ~/.node-red
npm remove node-red-contrib-ui-mp4frag

Then restart Node-RED. But also make sure that any nodes have been removed - including config nodes before doing this.

Hmm, though you are also getting Dashboard errors. If the above doesn't cure it. Try an npm rebuild or, if needing to go nuclear, simply delete the node_modules folder completely and then run npm install.

I've tried all those suggestions EXCEPT the nuclear one which I'm going to try now.

OK - so I deleted 'node_modules' then ran 'npm install' and immediately got the message below.
Note: The 'node_modules' folder has not been created.

pi@iot-super-server:~/.node-red $ npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: node-red-contrib-ui-mp4frag@0.1.0
npm ERR! Found: node-red-dashboard@3.2.0
npm ERR! node_modules/node-red-dashboard
npm ERR! node-red-dashboard@"~3.2.0" from the root project
npm ERR! peer node-red-dashboard@">=2.23.3" from node-red-contrib-ui-led@0.4.11
npm ERR! node_modules/node-red-contrib-ui-led
npm ERR! node-red-contrib-ui-led@"~0.4.11" from the root project
npm ERR! 3 more (node-red-node-ui-iframe, node-red-node-ui-list, node-red-node-ui-table)
npm ERR!

Oops, do it again, but this time, before the install, edit package.json are remove node-red-contrib-ui-mp4frag from the dependencies.

npm uninstall node-red-contrib-ui-mp4frag

Well after a lengthy interval the 'install' finished.
Now when I start Node-RED I get a huge list of missing node-types.

OK, as feared, you seem to have a more fundamental issue.

Have a look in your package.json first to see if the Node packages that provide those nodes are included. Did you get any errors from npm?

I didn't get any errors from 'npm install' when it eventually finished - but when I look in the node_modules folders they are all empty!!

Can you share the dependencies from the package.json?

Also, what platform are you on - is it a Pi by any chance? If so, have you checked that you don't have a failing SD-Card?

Maybe also do a quick test:

cd ~
mkdir temptest
cd temptest
npm init -y
npm install aaa

Then just check that it did what it should have done (creates a ~/temptest/node_modules/aaa/ folder with content). Just to make sure that npm is working correctly.

I'm booting off of an SSD 120GB - no SD-card involved.
The quick test did exactly what you said it would do.

I'm nearly at the point of giving up and re-installing Node-RED.
I'll back-up the flows file first.

Weird, sorry not to have helped. Not ever experienced anything like that.

Thanks for your help thus far.

I've ended up deleting Node-RED and starting from a clean sheet.

I did back-up the .node-red area in case I need to refer to crucial items.

At the moment I busy re-installing the missing nodes - what a boring task!!


Yes, but at least an easy enough one - I'll happily take boring over difficult - at least some times. :slight_smile:

1 Like

Same here. But once we've trained the computers to do the dull and tedious, there will be nothing left for us except the difficult or impossible...

1 Like

Installed all the missing nodes manually and am now getting these errors when I start Node-RED.
I've checked the paths and all the files are located in... /usr/lib/node_modules....

Any suggestions?

24 Jan 09:01:42 - [info] Node-RED version: v3.0.2
24 Jan 09:01:42 - [info] Node.js version: v16.19.0
24 Jan 09:01:42 - [info] Linux 5.10.52-v7l+ arm LE
24 Jan 09:01:43 - [info] Loading palette nodes
24 Jan 09:01:47 - [info] Worldmap version 2.33.0
24 Jan 09:01:47 - [info] Dashboard version 3.3.1 started at /ui
24 Jan 09:01:48 - [warn] rpi-gpio : Raspberry Pi specific node set inactive
24 Jan 09:01:48 - [warn] ------------------------------------------------------
24 Jan 09:01:48 - [warn] [node-red-contrib-hysteresis/hysteresis] 'hysteresis' already registered by module node-red-contrib-edge-trigger
24 Jan 09:01:48 - [warn] [node-red-contrib-kodi/kodi] Error: Cannot find module '/home/pi/.node-red/node_modules/node-red-contrib-kodi/kodi.js'
Require stack:

  • /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/loader.js
  • /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/index.js
  • /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/index.js
  • /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/index.js
  • /usr/lib/node_modules/node-red/lib/red.js
  • /usr/lib/node_modules/node-red/red.js

Just re-booted the Pi and the 'Require stack' errors seem to have gone away.
Now just have a "Waiting for missing types to be registered:" even though I have manually installed them.

Any ideas?

Note: I'm running Debian version: 10 (buster) on a RPi-4B

Starting as a systemd service.
24 Jan 09:39:33 - [info]
Welcome to Node-RED

24 Jan 09:39:33 - [info] Node-RED version: v3.0.2
24 Jan 09:39:33 - [info] Node.js version: v16.19.0
24 Jan 09:39:33 - [info] Linux 5.10.52-v7l+ arm LE
24 Jan 09:39:35 - [info] Loading palette nodes
24 Jan 09:39:39 - [info] Worldmap version 2.33.0
24 Jan 09:39:40 - [info] Dashboard version 3.3.1 started at /ui
24 Jan 09:39:40 - [warn] rpi-gpio : Raspberry Pi specific node set inactive
24 Jan 09:39:40 - [info] Settings file : /home/pi/.node-red/settings.js
24 Jan 09:39:40 - [info] Context store : 'default' [module=memory]
24 Jan 09:39:40 - [info] User directory : /home/pi/.node-red
24 Jan 09:39:40 - [info] Projects directory: /home/pi/.node-red/projects
24 Jan 09:39:40 - [info] Server now running at
24 Jan 09:39:40 - [info] Active project : home_automation
24 Jan 09:39:40 - [info] Flows file : /home/pi/.node-red/projects/home_automation/flows_iot-super-server.json
24 Jan 09:39:41 - [warn] Using unencrypted credentials
24 Jan 09:39:41 - [info] Waiting for missing types to be registered:
24 Jan 09:39:41 - [info] - sftp
24 Jan 09:39:41 - [info] - kodi-controller
24 Jan 09:39:41 - [info] - noraf-config
24 Jan 09:39:41 - [info] - alexa-remote-account
24 Jan 09:39:41 - [info] - clarify_api

Situation now is I can stop and start Node-RED without any errors BUT... I always get missing types..

I have deleted package-lock.json and used...
npm rebuild and npm install --force
I still get 'missing types' message (and the flow stops).
Any suggestions on what my next step should be to rectify this situation??

Are those nodes installed?
Start NR in safe mode (node-red --safe) and check the pallet manager to see if the nodes show up.

Haha, well there will always be plenty of that no matter how good we are - and then there is always the rest of the world messing up I find. That has kept me in profitable employment for over 40 years now. :rofl:

1 Like