Use these instructions to install the lab repository on your computer prior to starting the labs. You must also install Node.js (the most recent LTS version).
- These labs are intended to be used on systems running Windows 7 (and later), macOS X 10.1 (and later), and Linux.
- Multiple browsers - although individual labs may require a specific level of support for progressive web apps, we recommend trying out the labs on multiple browsers (where feasible) so that you get a sense of how different users might experience the app.
- A programming editor - for example, Atom, Sublime Text, or Notepad++ (for Windows only).
Install the latest version of Git on your computer.
Clone the repo
Open your computer's command line interface. Clone the course repository with Git using the following command:
git clone https://github.com/google-developer-training/pwa-training-labs.git
Then navigate into the repository:
Some projects in the download contain folders that correspond to checkpoints in the lab. You can refer back to these checkpoints if you get stuck during the labs.
Set up Node & NPM
If you don't have Node.js, download and install the latest long term support (LTS) version from the website. After Node.js is installed, you can skip the rest of this doc and start the labs.
If you already have Node.js installed on your computer, check that it is the latest LTS version with the following command:
If it's not the latest LTS version, follow the instructions below to install the right version.
If you have an existing version of Node.js installed that you would like to keep, you can install a Node.js version manager (for macOS and Linux platforms and Windows). This tool (NVM) lets you install multiple versions of Node.js, and easily switch between them. If you have issues with a specific version of Node.js, you can switch to another version with a single command.
Install Node.js by running one of the following commands from the command line:
If you have installed Node Version Manager (for macOS, Linux, or Windows):
nvm install node <version>
nvm install node 8.9.4
For the Windows version you can specify whether to install the 32-bit or 64-bit binaries. For example:
nvm install node 8.9.4 64
If you did not install NVM, download and install Node.js from the website.
This also installs Node's package manager,
Check Node and NPM versions
Check that Node and
npm are both installed by running the following commands from the command line:
node -v npm -v
If both commands return a version number, then the installations were successful.