4. Install packages

We’ll need to install a few packages for Node.js using npm, the Node Package Manager.

$ npm install -g live-server

The -g option installs packages globally. If there is a failure installing a package, you could try re-running the command. npm will skip over packages it has already installed.