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
From the course: Master Next.js: Elaborate Hands-On Web Development, React Basics, Advanced Next.js, and Deployment
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
(Locked)
Introduction and quick note about the upcoming final project2m 21s
-
(Locked)
How to start a Next.js template locally6m 12s
-
(Locked)
Next.js template file structure overview4m 30s
-
(Locked)
How pages work in Next.js3m 16s
-
(Locked)
Prefetching and codesplitting with Link and CSN – client-side navigation in Next.js9m 9s
-
(Locked)
-
-
-
-