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

Akeneo V4 install error - Yarn EACCES #11623

Closed
joaotnlima opened this issue Feb 24, 2020 · 9 comments
Closed

Akeneo V4 install error - Yarn EACCES #11623

joaotnlima opened this issue Feb 24, 2020 · 9 comments

Comments

@joaotnlima
Copy link

joaotnlima commented Feb 24, 2020

I'm reporting a Bug

Running install of akeneo V4.
After composer successfully install deps I ran make dev and:

make dependencies
docker-compose run -u node --rm node yarn install
yarn install v1.21.1
error An unexpected error occurred: "EACCES: permission denied, mkdir '/home/node/.yarn/v6'".
info If you think this is a bug, please open a bug report with the information provided in "/srv/pim/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Makefile:21: recipe for target 'node_modules' failed
make[1]: *** [node_modules] Error 1
make[1]: Leaving directory '/****/akeneo'
Makefile:65: recipe for target 'dev' failed
make: *** [dev] Error 2

Docker Version
Docker version 19.03.6, build 369ce74a3c
Docker-Compose Version
docker-compose version 1.25.4, build 8d51620a

@aligent-lturner
Copy link

The .yarn folder is set up as a volume - by default using ~/.cache/yarn, or ${HOST_YARN_CACHE_FOLDER} if you've set it. Check the permissions on that folder.

@soestm
Copy link

soestm commented Feb 25, 2020

@aligent-lturner I had the same issue. Changed the permissions of ~/.cache/yarn . Now it works. Thanks!

@joaotnlima
Copy link
Author

joaotnlima commented Feb 26, 2020

Hello, solved the issue with :z in the yarn cache folder(docker-compose.yaml):
'YARN_CACHE_FOLDER: '/home/node/.yarn:z

Thanks ;)

@Edweis
Copy link

Edweis commented Jan 13, 2021

Thanks, running sudo chown ec2-user ~/.cache/yarn fixed it for me (ec2-user is the user running the command).

@oumaymaabdesslem
Copy link

sudo chown ec2-user ~/.cache/yarn , I didn't understand what ec2-user , does not work for me

@dooblem
Copy link

dooblem commented Jun 17, 2021

I think this issue should be re-opened.

I had it with a fresh akeneo v5 install. When the ~/.cache/yarn directory do not exist, the docker volume mount creates the directory automatically, with root owner.

Then the yarn install crashes. However if you already have a ~/cache/yarn directory (created by yarn with the good ownership), the install is OK.

To reproduce:

  1. Remove the ~/cache/yarn directory
  2. composer create project (from https://docs.akeneo.com/5.0/install_pim/docker/installation_docker.html)
  3. make dev (from https://docs.akeneo.com/5.0/install_pim/docker/installation_docker.html)

@Jars-of-jam-Scheduler
Copy link

Jars-of-jam-Scheduler commented Jun 30, 2022

@aligent-lturner I had the same issue. Changed the permissions of ~/.cache/yarn . Now it works. Thanks!

Is it a really good solution to type sudo chown <the_user> ~/.cache/yarn just to be able to use it as a Docker volume for the installation script of Akeneo? I don't think so, tell me if I'm wrong..

I don't see any solution more adequate in these GitHub issue's answers. @allenprado @Edweis , except perhaps the solution of @joaotnlima who seems to have defined the Yarn cache used by the setup script of Akeneo as a new directory instead of ~/cache/yarn. Better solution indeed, I guess.

Please don't hesitate to correct me. (e.g.: I don't know what :z suffixed to a file name does, if doesn't aim to simply create a new one)

@joaotnlima
Copy link
Author

joaotnlima commented Jun 30, 2022

Hello, been a while :)

Adding some more info found here: https://docs.docker.com/storage/bind-mounts/
Hope this helps.

Screenshot 2022-06-30 at 22 57 36

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants
@dooblem @joaotnlima @Jars-of-jam-Scheduler @Edweis @aligent-lturner @oumaymaabdesslem @soestm and others