

This will allow you to look at the Next.js framework that has been created for your app. Once the package has been installed, change directories into your new app folder, cd my-next-app, then use code.

Install Next.js and create a project (replacing 'my-next-app' with whatever you'd like to call your app): npx create-next-app my-next-app. To install Next.js, which includes installing next, react, and react-dom:Ĭreate a new project folder: mkdir NextProjects and enter that directory: cd NextProjects. Doing so will significantly slow down your install and build times. Be careful not to install NodeJS or store files that you will be working with on the mounted C drive ( /mnt/c/Users/yourname$). To open this directory in Windows File Explorer, open your WSL command line, select your home directory using cd ~, then enter the command explorer.exe. Installing a Linux distribution with WSL will create a directory for storing files: \\wsl\Ubuntu-20.04 (substitute Ubuntu-20.04 with whatever Linux distribution you're using). We recommend using the Windows Subsystem for Linux when working with NodeJS apps for better performance speed, system call compatibility, and for parity when running Linux servers or Docker containers.

This guide assumes that you've already completed the steps to set up your Node.js development environment, including: To learn more about React and other JavaScript frameworks based on React, see the React overview page. These "universal" server-rendered web apps are also sometimes called “isomorphic”, meaning that code is shared between the client and server. It is basically a project boilerplate for React, crafted with attention to best practices, that allows you to create "universal" web apps in a simple, consistent way, with hardly any configuration. Next.js is a framework for creating server-rendered JavaScript apps based on React.js, Node.js, Webpack and Babel.js. A guide to help you install the Next.js web framework and get up and running on Windows.
