Please try to follow below steps for installing PWA:
To install Magento PWA Studio, firstly you must have any Magento 2.3.x version. Without it, you can’t obviously install Magento PWA Studio Project( 2.3), as no other version Magento version can support it.
Then, you will have to install NodeJS ( NodeJS >=10.14.1). If you are unaware of the procedure, follow the below-mentioned command. (Applicable only for Linux OS)
sudo apt-get install nodejs
Now check Node version :
Also, check the NPM version:
If the version you installed is a version below than the above-mentioned version, run below-mentioned command to install the latest and more stable version of the node.
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
Post-installation and running of NodeJS, you will have to install Yarn (Yarn >=1.13.0 ). Run the following command for the installation of Yarn. (Applicable only for Linux OS).
sudo npm install yarn -g
Now check yarn version :
Now that Yarn is installed, clone the PWA repository to your development directory.
git clone: https://github.com/magento-research/pwa-studio.git
Consecutive to this step, install the project dependencies by running the following command.
For creating the .env file, run the ensuing command from PWA root directory-
(For theme Venia you can use the Magento which is installed by you or the default Magento 2.3.1. Here we are using the default.)
" yarn buildpack create-env-file packages/venia-concept
You can also create the .env file and set your custom MAGENTO_BACKEND_URL value by using the following command:
MAGENTO_BACKEND_URL="https://YOUR_MAGENTO_BACKEND_URL/" yarn buildpack create-env-file packages/venia-concept
Install the SSL certificate as PWA runs on a secure path, You can run create-custom-origin command for generating SSL certificate:
yarn buildpack create-custom-origin packages/venia-concept
You can also install Venia Sample data, there is a bash script already available at packages/venia-concept/deployVeniaSampleData.sh
To install sample data in Magento, run the following commands:
(Step 7 and 8 can be skipped for now if not required as per your need.)
Build all the artefacts for your theme now by running-
yarn run build
Start the server by running any of the following commands as per your need, from you PWA project’s root directory.
yarn run watch:venia
For running full developer PWA Studio-
yarn run watch:all
For building artefacts and running PWA studio to staging-
yarn run build && yarn run stage:venia
The installation of PWA is now complete. To whether the installation is successful or not, when you will run the above-mentioned commands, you will find the URL where the PWA is running.
You can also refer to below link :https://cedcommerce.com/blog/install-magento-pwa-studio/amp/
Problem solved? Please give 'Kudos' and accept 'Answer as Solution'.