`yarn lint` not working on brand new app
See original GitHub issueWhat version of Next.js are you using?
11.1.2
What version of Node.js are you using?
16.6.1
What browser are you using?
Edge 94
What operating system are you using?
Windows 11 (Insider build: 22000.258)
How are you deploying your application?
next start
Describe the Bug
When I create a brand new app using yarn create next-app
, and try to run yarn lint
, an error is thrown:
I wanted to try out linting cause apparently Im a bad developer for not doing so and I don’t know what I’m doing wrong.
Expected Behavior
I would have expected it to lint my app
To Reproduce
- Create a brand new app using
yarn create next-app
- Run
next lint
in the app directory
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Command yarn lint not working when init a new project #27695
It's likely that the plugin isn't installed correctly. Try reinstalling by running the following: npm install @react-native-community/eslint- ...
Read more >Troubleshooting a Next.js app with ESLint - LogRocket Blog
Inside your Next.js app, add a new script called lint — its value should be next lint : "scripts" : { ... "lint":...
Read more >error Command failed with exit code 1. when I try to run yarn
what you need to do is just simple: follow these steps: rm -rf node_modules; yarn cache clean; yarn; yarn start.
Read more >ESLint not working in VSCode? Help build a troubleshooting ...
Take a look into your eslintrc configuration file and make a list of all plugins and presets. Than make sure, they as well...
Read more >User Guide | eslint-plugin-vue
If you have issues with these, please also refer to the FAQ. ... That means you can just run yarn lint or npm...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I think this is related to a change in eslint’s
package.json
. They added this field:Which causes the require in
hasNecessaryDependencies
to throw this error:Removing the
exports
field manually from eslint’spackage.json
also fixes this issue.Closing as this is a duplicate. Like others mentioned, you’ll need to downgrade to v7 for the meantime.
There’s an open PR to add support for v8 (#29865). Once all sub-dependencies used in Next.js’ ESLint config and plugin is supported, it’ll be merged!