Next is not recognized as an internal or external command, operable program, or batch file.

Error “‘ next ‘ is not recognized as an internal or external command, operable program or batch file”.

This error occurs when we forget to install the dependencies in a Next.js project.

To solve the error, run npm install react react-dom next to install next before running npm run dev.

Open your shell in your project’s root directory (where your package.json is) and run the following commands.

If you use NPM:

npm install

npm install react react-dom next

npm run dev

If you use YARN:

yarn install

yarn add react react-dom next

yarn dev

You can learn more by following my social media:

Support my blog by this link: https://buymeacoffee.com/edx126

Schedule a Call

Posted by Edgar Hovhannisyan

Comments

Your email address will not be published. Required fields are marked *