Nodes update problems

Hi together,
Raspberry pi2
nodejs version: 8.12.0
node-red version 19.4

i have problems updating my nodes...
i try that via the mange palette on the ui,
here is the log output:


10 Oct 10:52:34 - [info] Server now running at http://127.0.0.1:1880/
10 Oct 10:52:58 - [info] Upgrading module: node-red-dashboard to version: 2.9.8
10 Oct 10:53:32 - [warn] Installation of module node-red-dashboard failed:
10 Oct 10:53:32 - [warn] ------------------------------------------
10 Oct 10:53:32 - [warn] npm WARN checkPermissions Missing write access to /home/pi/.node-red/node_modules/engine.io/node_modules/mime-db
npm WARN checkPermissions Missing write access to /home/pi/.node-red/node_modules/engine.io/node_modules/mime-types
npm WARN checkPermissions Missing write access to /home/pi/.node-red/node_modules/node-red-dashboard
npm WARN checkPermissions Missing write access to /home/pi/.node-red/node_modules/engine.io/node_modules
npm WARN node-red-project@0.0.1 No repository field.
npm WARN node-red-project@0.0.1 No license field.
npm ERR! path /home/pi/.node-red/node_modules/engine.io/node_modules/mime-db
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/home/pi/.node-red/node_modules/engine.io/node_modules/mime-db'
npm ERR! { Error: EACCES: permission denied, access '/home/pi/.node-red/node_modules/engine.io/node_modules/mime-db'
npm ERR! stack: 'Error: EACCES: permission denied, access '/home/pi/.node-red/node_modules/engine.io/node_modules/mime-db'',
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/home/pi/.node-red/node_modules/engine.io/node_modules/mime-db' }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).
npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2018-10-10T08_53_32_760Z-debug.log
10 Oct 10:53:32 - [warn] ------------------------------------------

i already got that it has something to do with permissions?

what can i do to get rid of this?

~/.node-red $ ls -l
insgesamt 172
drwxr-xr-x 3 pi pi 4096 Mär 20 2017 lib
drwxr-xr-x 334 pi pi 12288 Okt 10 10:41 node_modules
-rw-r--r-- 1 pi pi 615 Aug 15 14:11 package.json
-rw-r--r-- 1 pi pi 135426 Aug 15 14:11 package-lock.json
drwxr-xr-x 3 pi pi 4096 Sep 10 10:41 projects
-rw-r--r-- 1 pi pi 11555 Sep 10 10:41 settings.js

It sounds as if you have somehow not got write permission to some files, possibly you installed a node using sudo (which you should not do unless you are installing with -g). To restore permissions to all files in your home folder you can run

sudo chown -R pi:pi /home/pi

Or if you just wanted to do that on the .node-red folder then
sudo chown -R pi:pi /home/pi/.node-red

As always when using sudo take care when entering it as typos can be disastrous when using sudo. Preferably you should look up the commands being run and make sure they are ok.

1 Like

Thanks for the hint, i was juast about to reply a possible solution
sudo chown -R $(whoami) ~/.node-red

:slight_smile:

Did it work?

Yes, ist worked that way :slight_smile: