How to install PWA?

Pre-Installation Requirements

  1. Installation is performed on a  Linux kernel operating system (OS). Ubuntu distributions or MacOS are preferred;

Windows OS is not supported. 

    2. NodeJS (version 10.14.1 and higher) and Yarn (version 1.13.0 and higher), preinstalled on the OS. 

Installing and Configuring PWA Studio

  1. Use the following command to install PWA Studio: 

yarn create @magento/pwa

    2. Enter any name (no spaces) in response to the "Project root directory" query, for example, "site".  This will create a directory to host all the files of the installation.

    3. Enter @magento/venia-concept@10.0.0 in response to the "Which template would you like to use to bootstrap install? Defaults to '@magento/venia-concept'."

    4. Choose "Other" for the "Magento instance to use as a backend" query

    5. Enter the address of the Server in response to the "URL of a Magento to use as a backend" query. The address must start with <https://>

    6. Leave default replies for all the remaining queries. 

Reply "y" to the "Install package dependencies with yarn..."query.

    7. Go to the project folder: 

cd <project_name>

    8. Run the following command: 

yarn run buildpack create-custom-origin .

 

The command is to end with space and dot.

This will ensure that no error will be ignored on running the project.

 

Running PWA Studio Project

  1. Run the following command to test the Development version: 

yarn run watch

This will start the Development Server. See the console output for the address of the server.

    2. Run the following command to test the Production version: 

yarn build && yarn start

This will start the Production Server. See the console output for the address of the server.

Report incorrect information

Still Have Questions?

Our customer care team is here for you!

Contact Us