I started my first internship on monday and I’m working on a PIM created by Akeneo, which is build using Symfony. They have a nice guide to install it on their website and I figured i’d learn docker too.
Here are the instructions i followed so far :
https://docs.akeneo.com/latest/install_pim/docker/installation_docker.html
I just didn’t configure my package manager before installing because after searching I didn’t really find how or where to do that. (the section where they talk about the default values of yarn and composer).
The install didn’t work if I didn’t sudo, same for the "make dev".
Here are the error messages for the make dev :
make dependencies
make[1]: Entering directory '/mnt/c/Users/Yvesa/pim'
docker-compose run -u www-data --rm php php -d memory_limit=4G /usr/local/bin/composer update
Creating pim_php_run ... done
Cannot create cache directory /var/www/.composer/cache/repo/https---repo.packagist.org/, or directory is not writable. Proceeding without cache
Cannot create cache directory /var/www/.composer/cache/files/, or directory is not writable. Proceeding without cache
Cannot create cache directory /var/www/.composer/cache/repo/https---flex.symfony.com/, or directory is not writable. Proceeding without cache
Loading composer repositories with package information
Updating dependencies
Cannot create cache directory /var/www/.composer/cache/repo/https---repo.packagist.org/, or directory is not writable. Proceeding without cacheNothing to modify in lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Package doctrine/doctrine-cache-bundle is abandoned, you should avoid using it. No replacement was suggested. Package doctrine/reflection is abandoned, you should avoid using it. Use roave/better-reflection instead.
Package symfony/inflector is abandoned, you should avoid using it. Use use `EnglishInflector` from the String component instead instead.
Package twig/extensions is abandoned, you should avoid using it. No replacement was suggested.
Generating autoload files
composer/package-versions-deprecated: Generating version class...
composer/package-versions-deprecated: ...done generating version class
76 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Symfony recipes are disabled: "symfony/flex" not found in the root composer.json
> bash vendor/akeneo/pim-community-dev/std-build/install-required-files.sh
src/ directory already exists. Not preparing the directory content.
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1 docker-compose run -u node --rm -e YARN_REGISTRY -e PUPPETEER_SKIP_CHROMIUM_DOWNLOAD node yarn install
Creating pim_node_run ... done
yarn install v1.22.5
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.
ERROR: 1
make[1]: *** [Makefile:21: node_modules] Error 1
make[1]: Leaving directory '/mnt/c/Users/Yvesa/pim'
make: *** [Makefile:74: dev] Error 2
❯ Cannot create cache directory /var/www/.composer/cache/repo/https---repo.packagist.org/, or directory is not writable. Proceeding without cache
❯ code ~/.zshrc
^[[A^C
❯ cd ~/
❯ sudo chmod -R 777 .cache
❯ z /mnt/c/Users/Yvesa/pim
❯ sudo make dev
make dependencies
make[1]: Entering directory '/mnt/c/Users/Yvesa/pim'
docker-compose run -u www-data --rm php php -d memory_limit=4G /usr/local/bin/composer update
Creating pim_php_run ... done
Cannot create cache directory /var/www/.composer/cache/repo/https---repo.packagist.org/, or directory is not writable. Proceeding without cache
Cannot create cache directory /var/www/.composer/cache/files/, or directory is not writable. Proceeding without cache
Cannot create cache directory /var/www/.composer/cache/repo/https---flex.symfony.com/, or directory is not writable. Proceeding without cache
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Package doctrine/doctrine-cache-bundle is abandoned, you should avoid using it. No replacement was suggested. Package doctrine/reflection is abandoned, you should avoid using it. Use roave/better-reflection instead.
Package symfony/inflector is abandoned, you should avoid using it. Use use `EnglishInflector` from the String component instead instead.
Package twig/extensions is abandoned, you should avoid using it. No replacement was suggested.
Generating autoload files
composer/package-versions-deprecated: Generating version class...
composer/package-versions-deprecated: ...done generating version class
76 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Symfony recipes are disabled: "symfony/flex" not found in the root composer.json
> bash vendor/akeneo/pim-community-dev/std-build/install-required-files.sh
src/ directory already exists. Not preparing the directory content.
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1 docker-compose run -u node --rm -e YARN_REGISTRY -e PUPPETEER_SKIP_CHROMIUM_DOWNLOAD node yarn install
Creating pim_node_run ... done
yarn install v1.22.5
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.
ERROR: 1
make[1]: *** [Makefile:21: node_modules] Error 1
make[1]: Leaving directory '/mnt/c/Users/Yvesa/pim'
make: *** [Makefile:74: dev] Error 2
❯ "EACCES: permission denied, mkdir '/home/node/.yarn/v6'"
I found someone with a similar problem than me, and he fixed his problem because his .config file in his root directory had the wrong permissions (sudo instead of username), so I chown and changed it, and it now has my username permissions, and I also chmod 777 .cache, but it didn’t seem to help.
I’m really new at this, and I’d really like to get my own development environmnent to practice learning php connectors, REST api calls and all the stuff I need this symfony / akeneo / docker environment for…
I know it’s a big one but if anybody can help that would be such a huge relief, thanks a lot !
3
Answers
First a small indication: Akeneo is the society that develops the PIM, not the name of the PIM. PIM is his name. 😉
The error message means that during the creation of the repository /home/node/.yarn/v6, it get incorrect permissions.
So check the permission of /home/node and /home/node/.yarn repository 😉
If permissions aren’t correct, chmod or chown it and retry the installation command.
Best regards,
Elodie
Maybe you allready figured it out by your self but for the record:
When running
docker-compose run node ls -lah /home/node
you see that
.yarn
has root ownership. You can change it by running:docker-compose run -u root node chown -R node:node /home/node/.yarn
After that you should be able to run
make
properly.This worked for me for Akeneo PIM 3.7 :