10

I've installed Magento 2.3.1 and trying to use PWA but it's not working, I have followed the below link https://hackernoon.com/getting-started-with-magento-pwa-studio-with-poc-c54c33f8d038

but when i was trying to create symlink by using the following commands

ln -s /var/www/html/magento/pwa-studio/packages/pwa-module app/code/Magento/

ln -s /var/www/html/magento/pwa-studio/packages/venia-concept app/design/frontend/Magento/venia

Does anybody know how to create a PWA project? I'm Working in Windows Machine

2

Setup PWA (Linux os)

Step 1 : Install magento 2.3.1

Step 2 : Install/upgrade node

Use n module from npm in order to upgrade node

sudo npm install n -g

For the latest stable version:

sudo n stable

For the latest version:

sudo n latest

Step 3: Install/update yarn :

sudo npm install --global yarn

sudo npm upgrade --global yarn 

Step 4 : Install node-gyp - Node.js native addon build tool

sudo npm install -g node-gyp

Step 5 : Clone the PWA Studio repository

Go to html root and run :

git clone https://github.com/magento-research/pwa-studio.git

After running this you will get pwa-studio folder

Step 6: Install PWA Studio dependencies

sudo yarn install

Step 7: Specify the Magento backend server

Under the packages/venia-concept directory, copy .env.dist into a new .env file:

Example command:

sudo cp packages/venia-concept/.env.dist packages/venia-concept/.env

change in .env file (this will be your magento URL, not admin url):

MAGENTO_BACKEND_URL="https://release-dev-231-npzdaky-zddsyhrdimyra.us-4.magentosite.cloud/"

Step 8: Now create a build

sudo yarn run build

Step 9: Run the server

sudo yarn run watch:venia

Starts the Venia storefront development environment only.

sudo yarn run watch:all

Runs the full PWA Studio developer experience, which include Venia hot-reloading and concurrent Buildpack/Peregrine rebuilds.

sudo yarn run build && yarn run stage:venia

Generates build artifacts and runs the staging environment, which uses more compressed assets and more closely reflects production.

Once you run one of the above command you will get the virtul url created by PWA.

NOTE: if you are rood user then use sudo.

Follow Magento 2 officical dev docs:

https://devdocs.magento.com/guides/v2.3/pwa/

  • I already tried from the official website but noting is clear. – Vinod Kumar May 28 at 7:36
  • Actully you need to install the third party setups like yarn, node as recommended for PWA – Saphal Jha May 28 at 8:32
  • You are right, i installed pwa-studio, node module and yarn also, actually I'm working in windows machine. – Vinod Kumar May 28 at 8:37
  • ohk, I'll update command for window as well, you just need to install all the required softwares then those commands will work perfectly. – Saphal Jha May 28 at 8:50
  • I'll be thankful to you :) if is it possible please guide me step by step like the above answer. – Vinod Kumar May 28 at 8:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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