Updating to a new version of NR does not work with command

I made this topic a while ago:
https://discourse.nodered.org/t/edit-displays-if-a-new-node-red-update-is-available-online-and-update-it-from-the-dashboard/30061

to display if a new version of NR was online AND to update it on the RPI in one click in Dashboard v1.
Today the update request by the EXEC node:

sudo npm install -g --unsafe-perm node-red

does not work and gives me an error:

Command failed:  sudo npm install -g --unsafe-perm node-red
npm ERR! code ENOTEMPTY
npm ERR! syscall rename
npm ERR! path /usr/lib/node_modules/node-red
npm ERR! dest /usr/lib/node_modules/.node-red-eOn6FCQ9
npm ERR! errno -39
npm ERR! ENOTEMPTY: directory not empty, rename '/usr/lib/node_modules/node-red' -> '/usr/lib/node_modules/.node-red-eOn6FCQ9'

I see that I need to rename a folder because it is not empty, but I'm not sure I understand what to do to make my update command work again?

Delete this directory. That's it.

These can get left behind by a failed or interrupted npm install.

:star_struck: thank you, I deleted this folder and the update worked

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.