I was trying to set up and install Magento 2 PWA studio with venia concept now I am getting permission errors while running the yarn run build
and yarn run watch:venia
. I tried to set the permission for the user directory and even tried to run the commands with sudo. It's still running into the permission error. Any help would be much appreciated.
2 Answers
I would reset the files ownership from your pwa-studio
folder to belong to your user ubuntu
.
sudo chown -R ubuntu:ubuntu pwa-studio
Once done, do not use sudo
when performing any yarn
command. I believe this is what is the root of your issue.
As for the permissions of the file, It may be worth to reset them to 644, 755 as per the screenshot. The reason for this is that by running sudo, some folders may now be compromised and resetting them may help too
-
I tried setting permissions as per your suggestion still no luck prnt.sc/MRY04NwgVwLO Commented Aug 30, 2022 at 9:24
Have you created a pwastudio project using the yarn create @magento/pwa
command if not then follow along with this referance: https://developer.adobe.com/commerce/pwa-studio/tutorials/setup-storefront/.
Also based on the location you are firing yarn build command from the venia-concept directly. So you can fire this from your root directory of project as it works as meta packages.
You can look the package.json
file to refer the scripts command it will provide you short hand to use it with the yarn run command_listed_onscript with that you can create build like yarn run build
or start development with yarn run watch