DEV Community

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

Posted on

1 1

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!

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay