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

mktoho @mktoho12

About: Hello everyone. I am a programmer from Japan. I am not good at English, so I am posting the text translated by a computer.

Location:
Tokyo Japan
Joined:
Nov 15, 2017

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

Publish Date: Oct 13 '21
3 0

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!

Comments 0 total

    Add comment