npm run setup error
kcprom opened this issue · 2 comments
I had a working instance of assistant-relay v3 working for nearly two years that stopped working on my Raspberry Pi 4
I updated Raspian Buster and reinstalled node.js and npm using nvm as research indicated that could solve the "EACCES: permission denied" error that appears below. Those resolution steps have not been successful. As such I am reaching out for help. Here are my software versions:
node -v = 10.24.0
pm2 -v = 5.2
npm -v = 6.14.11
python -V = 2.7.16
python3 -V = 3.7.3
Below is copy of the commands issued and the results.
pi@raspberrypi:~/Assistant-Relay $ sudo npm run setup
assistant-relay@3.3.2 setup
npm i -g pm2 && npm i
glob error [Error: EACCES: permission denied, scandir '/root/.npm/_logs'] {
errno: -13,
code: 'EACCES',
syscall: 'scandir',
path: '/root/.npm/_logs'
}
npm WARN logfile Error: EACCES: permission denied, scandir '/root/.npm/_logs'
npm WARN logfile error cleaning log files [Error: EACCES: permission denied, scandir '/root/.npm/_logs'] {
npm WARN logfile errno: -13,
npm WARN logfile code: 'EACCES',
npm WARN logfile syscall: 'scandir',
npm WARN logfile path: '/root/.npm/_logs'
npm WARN logfile }
npm ERR! code EACCES
npm ERR! syscall mkdir
npm ERR! path /root/.npm/_cacache/tmp
npm ERR! errno EACCES
npm ERR!
npm ERR! Your cache folder contains root-owned files, due to a bug in
npm ERR! previous versions of npm which has since been addressed.
npm ERR!
npm ERR! To permanently fix this problem, please run:
npm ERR! sudo chown -R 1000:1000 "/root/.npm"
npm ERR! A complete log of this run can be found in:
pi@raspberrypi:/Assistant-Relay $ sudo chown -R 1000:1000 "/root/.npm"/Assistant-Relay $ sudo npm run setup
pi@raspberrypi:
assistant-relay@3.3.2 setup
npm i -g pm2 && npm i
glob error [Error: EACCES: permission denied, scandir '/root/.npm/_logs'] {
errno: -13,
code: 'EACCES',
syscall: 'scandir',
path: '/root/.npm/_logs'
}
npm WARN logfile Error: EACCES: permission denied, scandir '/root/.npm/_logs'
npm WARN logfile error cleaning log files [Error: EACCES: permission denied, scandir '/root/.npm/_logs'] {
npm WARN logfile errno: -13,
npm WARN logfile code: 'EACCES',
npm WARN logfile syscall: 'scandir',
npm WARN logfile path: '/root/.npm/_logs'
npm WARN logfile }
npm ERR! code EACCES
npm ERR! syscall mkdir
npm ERR! path /root/.npm/_cacache/tmp
npm ERR! errno EACCES
npm ERR!
npm ERR! Your cache folder contains root-owned files, due to a bug in
npm ERR! previous versions of npm which has since been addressed.
npm ERR!
npm ERR! To permanently fix this problem, please run:
npm ERR! sudo chown -R 1000:1000 "/root/.npm"
npm ERR! A complete log of this run can be found in:
pi@raspberrypi:~/Assistant-Relay $
any news ?