2

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.

enter image description here

2 Answers 2

1

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.

enter image description here

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

1
1

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

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.