DEV Community

Cover image for The project created by "yarn create next-app" does not recognize eslint
mktoho
mktoho

Posted on

The project created by "yarn create next-app" does not recognize eslint

Problem

As of October 13, 2021, the project created by yarn create next-app fails with yarn lint.

yarn create next-app my-app
cd my-app
yarn lint
Enter fullscreen mode Exit fullscreen mode
error - ESLint must be installed: yarn add --dev eslint
Enter fullscreen mode Exit fullscreen mode

error - ESLint must be installed

However, eslint is listed in the dependencies of the generated package.json.

  "devDependencies": {
    "eslint": "8.0.0",
    "eslint-config-next": "11.1.2"
  }
Enter fullscreen mode Exit fullscreen mode

Solution

I changed the eslint version to 7.x and it worked!

yarn add --dev eslint@7.32.0
yarn lint
Enter fullscreen mode Exit fullscreen mode

No ESLint warnings or errors

I did it!

Top comments (0)