From the course: Master Next.js: Elaborate Hands-On Web Development, React Basics, Advanced Next.js, and Deployment

Unlock this course with a free trial

Join today to access over 25,200 courses taught by industry experts.

How to start a Next.js template locally

How to start a Next.js template locally

So, the first thing we want to do is create a Next app. But instead of building it from scratch as we did last time, and installing the Node modules, what we're going to do is run a command on Node. So we're going to use npx. And npx, by the way, it's the Node package runner. So npm is what you would see for a default package manager for Node to install packages, like we did previously. npx is basically a tool that comes bundled with npm for higher versions and it's used to execute node packages that are not globally installed. And it's just a better practice to use mpx over npm because you get the latest version, no global installations that can mess with your global set environment. We're going to avoid version conflicts and it's just an easier method to use. So we're going to say mpx create next app. Those of you who have used React will notice that it's similar. We want the latest version, so we say at latest, and we're going to add a few tags here, because we're going to use a…

Contents