btholt / btholt/complete-intro-to-react-v6

Javascript Tools: ESLint - error installing elint and config

Open
#52 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.4k
Forks
202
PR merge metrics
No merged PRs in 30d

Description

Following along in the course, have arrived at ESlint section. Trying to runt he command:

`npm install -D eslint@7.18.0 eslint-config-prettier@8.1.0`

receive the errors

```
PS C:\www\complete-intro-to-react-v6\homework\AdoptMe> npm install -D eslint@7.18.0 eslint-config-prettier@8.1.0 > error-text.txt
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: gatsby@2.30.1
npm ERR! Found: react@17.0.1
npm ERR! node_modules/react
npm ERR! peer react@"17.0.1" from react-dom@17.0.1
npm ERR! node_modules/react-dom
npm ERR! peer react-dom@"^15.0.0 || ^16.0.0 || ^17.0.0 " from react-hot-loader@4.13.0
npm ERR! node_modules/react-hot-loader
npm ERR! react-hot-loader@"^4.12.21" from gatsby@2.30.1
npm ERR! node_modules/gatsby
npm ERR! peer gatsby@"^2.0.0" from babel-plugin-remove-graphql-queries@2.14.0
npm ERR! node_modules/babel-plugin-remove-graphql-queries
npm ERR! 11 more (gatsby-plugin-page-creator, ...)
npm ERR! react-dom@"^17.0.1" from the root project
npm ERR! peer react@">=16.3.0" from react-helmet@6.1.0
npm ERR! node_modules/react-helmet
npm ERR! peer react-helmet@"^5.1.3 || ^6.0.0" from gatsby-plugin-react-helmet@3.8.0
npm ERR! node_modules/gatsby-plugin-react-helmet
npm ERR! gatsby-plugin-react-helmet@"^3.8.0" from the root project
npm ERR! react-helmet@"^6.1.0" from the root project
npm ERR! 3 more (react-hot-loader, react-side-effect, the root project)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.4.2" from gatsby@2.30.1
npm ERR! node_modules/gatsby
npm ERR! peer gatsby@"^2.0.0" from babel-plugin-remove-graphql-queries@2.14.0
npm ERR! node_modules/babel-plugin-remove-graphql-queries
npm ERR! babel-plugin-remove-graphql-queries@"^2.14.0" from gatsby@2.30.1
npm ERR! 1 more (gatsby-plugin-typescript)
npm ERR! peer gatsby@"^2.0.0" from gatsby-plugin-page-creator@2.8.0
npm ERR! node_modules/gatsby-plugin-page-creator
npm ERR! gatsby-plugin-page-creator@"^2.8.0" from gatsby@2.30.1
npm ERR! 10 more (gatsby-plugin-react-helmet, gatsby-plugin-sharp, ...)
npm ERR!
npm ERR! Conflicting peer dependency: react@16.14.0
npm ERR! node_modules/react
npm ERR! peer react@"^16.4.2" from gatsby@2.30.1
npm ERR! node_modules/gatsby
npm ERR! peer gatsby@"^2.0.0" from babel-plugin-remove-graphql-queries@2.14.0
npm ERR! node_modules/babel-plugin-remove-graphql-queries
npm ERR! babel-plugin-remove-graphql-queries@"^2.14.0" from gatsby@2.30.1
npm ERR! 1 more (gatsby-plugin-typescript)
npm ERR! peer gatsby@"^2.0.0" from gatsby-plugin-page-creator@2.8.0
npm ERR! node_modules/gatsby-plugin-page-creator
npm ERR! gatsby-plugin-page-creator@"^2.8.0" from gatsby@2.30.1
npm ERR! 10 more (gatsby-plugin-react-helmet, gatsby-plugin-sharp, ...)
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\Alexander Chesser\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Alexander Chesser\AppData\Local\npm-cache\_logs\2021-10-30T18_52_57_764Z-debug.log
```

starting to investigate now, but if @btholt (or anyone) knows what the answer is here it might help me and a lot of people who come after me.

edit: first point confirmed is that `eslint` on its own fails to install, `eslint-config-prettier` does not. In this case I've installed without version numbers.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in the homework/AdoptMe directory and reproduce the npm install command shown in the issue. Read the ERESOLVE output, focusing on the conflicting React and Gatsby peer dependencies; the work is done when the requested ESLint packages install without dependency-resolution errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.