‘next’ is not recognized as an internal or external command, operable program or batch file. [Solved]

Often this error comes on running next js after creating the project. In this blog, I am telling you an easy way to solve this error. This error comes due to the missing of the .next folder. Which can be created by a command.

First of all, you go to the project directory where you have created your next project.

Run this command

npm install next react react-dom
# or
yarn add next react react-dom

After successfully install all files run this command.

npm run dev

Visit http://localhost:3000 to view your application.

I hope this will helps you.