0

I just installed NextJS 10.2 on my PC running Linux Mint 20.1 (Linux Kernel 5.4.0-73-generic). Upon executing next dev, I'm getting the following error.

Command 'next' not found, but can be installed with:
sudo apt install mailutils-mh # version 1:3.7-2.1, or
sudo apt install mmh # version 0.4-2
sudo apt install nmh # version 1.7.1-6

package.json

{
  "name": "new-next-app",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start"
  },
  "dependencies": {
    "next": "10.2.0",
    "react": "17.0.2",
    "react-dom": "17.0.2"
  }
}

I also ran sudo apt install mailutils-mh andd tried restarting the server but to no avail. What could be the problem?

1 Answer 1

1

You didn't need to install a random mail utility package.

Instead, if you're using npm, do

npm start dev

or if you're using yarn, do

yarn dev

.

This lets npm or yarn take care of correcting your PATH so your node_modules/.bin/ is there (and that's where the next script lives).

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.