

Name the new project and change its location if necessary, then click Create. In the New Project dialog, select Empty Project. Learn more about adding Next.js to a project from the Next.js official website. In this case, you will have to configure the build pipeline yourself. Install Next.js in an empty IntelliJ IDEA project Npx create-next-app to create an application. IntelliJ IDEA also creates an npm start and JavaScript Debug configurations with default settings for running or debugging your application.Īlternatively, open the built-in Terminal and type: When you click Create, IntelliJ IDEA generates a Next.js-specific project with all the required configuration files and downloads the required dependencies. ts files for your application and a tsconfig.json configuration file. To use TypeScript instead of JavaScript, select the Use TypeScript template checkbox. When creating an application, select the folder where the create-next-app package is stored.

Select a configured interpreter from the list or choose Add to configure a new one.įrom the create-next-app list, select npx create-next-app.Īlternatively, for npm version 5.1 and earlier, install the create-next-app package yourself by running npm install -save-dev next react react-dom in the Terminal Alt+F12. In the Node Interpreter field, specify the Node.js interpreter to use. Make sure that Next.js is selected in Project type.

In the right-hand part of the wizard, specify the project name and the folder to create it in. In the New Project dialog, select Next.js in the left-hand pane. Select File | New | Project from the main menu or click the New Project button on the Welcome screen. Generate a Next.js application with create-next-app Learn more about starting with Next.js from the Next.js official website. Of course, you can still download create-next-app yourself or create an empty IntelliJ IDEA project and install Next.js in it. As a result, your development environment is preconfigured to use Next.js. The recommended way to start building a new Next.js application is the create-next-app package, which IntelliJ IDEA downloads and runs for you using npx. Make sure the JavaScript and TypeScript and Next.js Support required plugins are enabled on the Settings | Plugins page, tab Installed, see Managing plugins for details. IntelliJ IDEA integrates with the Next.js React framework.
