Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

glob error [Error: EACCES: permission denied, scandir '/root/.npm/_logs'] #77

Open
missinglink opened this issue May 28, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@missinglink
Copy link
Member

missinglink commented May 28, 2022

cc/ @Joxit are you seeing this too?

duplicated here, although I'm not convinced its an issue with the baseimage:
pelias/docker-baseimage#25

docker pull pelias/spatial:latest
docker run --rm -it \
  --entrypoint=npm \
  pelias/spatial \
  run env_check
> pelias-spatial@0.0.0-development env_check
> ./bin/env_check

glob error [Error: EACCES: permission denied, scandir '/root/.npm/_logs'] {
  errno: -13,
  code: 'EACCES',
  syscall: 'scandir',
  path: '/root/.npm/_logs'
}
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"
@missinglink missinglink added the bug Something isn't working label May 28, 2022
@Joxit
Copy link
Member

Joxit commented May 28, 2022

Yes I have this one too ! But since it's only for logs, I thought there was no need to worry about it.

I didn't understand why this is happening since the user is root at docker build... and the folder /root/.npm seems to exists 🤷

@Joxit
Copy link
Member

Joxit commented May 28, 2022

Oh, my bad, I thought you were talking about build time !

So yes I have the same issue on a fresh image... Even tests are not working...

@Joxit
Copy link
Member

Joxit commented May 28, 2022

Okay, this is a nonsense, since they said the issue is caused because we are root... I tried with the user pelias. Here is the prompt:

docker run --rm -it   --entrypoint=npm  --user pelias pelias/spatial   run env_check
> pelias-spatial@0.0.0-development env_check
> ./bin/env_check

Need to install the following packages:
  tap
Ok to proceed? (y) 

This means the real error is hidden when we are logged as root (tap is missing). And as pelias user, we cannot install tap because all files are owned by root 😓 (tap is missing because we used --production
So IMO there is no need to worry about this one 😅 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants