Can't install any palettes

Running nodered in docker in an unRAID server. I am trying to add a username and password so i am trying to install node-red-admin and i know i first need to enter into the docker by using:

docker exec -it NodeRed-OfficialDocker /bin/bash

This then takes me in and I am trying to run the command:

npm install -g node-red-admin

and i get the following:

npm WARN deprecated request@2.88.2: request has been deprecated, see
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/local/lib/node_modules
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR!  { [Error: EACCES: permission denied, access '/usr/local/lib/node_modules']
npm ERR!   stack:
npm ERR!    'Error: EACCES: permission denied, access \'/usr/local/lib/node_modules\'',
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/usr/local/lib/node_modules' }
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.

npm ERR! A complete log of this run can be found in:
npm ERR!     /usr/src/node-red/.npm/_logs/2020-04-17T03_39_42_511Z-debug.log

I have already tried changing the owner of the docker data folder to nobody:users because i noticed some files belonged to root but that didn't do anything. I am not sure how to get unstuck from this...

EDIT: ok so i decided to add the -u flag to the docker exec command and add root to it, this seems to be working...

docker exec -it -u root NodeRed-OfficialDocker bash

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