Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package.json for eslint-config-react-app on NPM is incorrect #8998

Closed
Svish opened this issue May 13, 2020 · 16 comments
Closed

Package.json for eslint-config-react-app on NPM is incorrect #8998

Svish opened this issue May 13, 2020 · 16 comments

Comments

@Svish
Copy link

Svish commented May 13, 2020

Describe the bug

The package.json file for eslint-config-react-app differs between NPM and Git for one peer dependency:

  • Git: "eslint-plugin-react-hooks": "1.x || 2.x || 3.x || 4.x"
  • Npm: "eslint-plugin-react-hooks": "1.x || 2.x"

Both has "version": "5.2.1", and everything else matches, except for this one peer dependency. 😕

Steps to reproduce

  1. Inspect package.json on git:
    "version": "5.2.1"
    "eslint-plugin-react-hooks": "1.x || 2.x || 3.x || 4.x"
  2. Run npm pack eslint-config-react-app
  3. Inspect the package.json within the downloaded tgz package:
    "version": "5.2.1"
    "eslint-plugin-react-hooks": "1.x || 2.x"

Expected behavior

Would expect the acceptable versions of "eslint-plugin-react-hooks" to be the same in both places.

Actual behavior

Acceptable versions do not match. Means npm gives me a warning when I try to upgrade eslint-plugin-react-hooks to its latest version, 4.x:

> npm install eslint-plugin-react-hooks@4
npm WARN eslint-config-react-app@5.2.1 requires a peer of eslint-plugin-react-hooks@1.x || 2.x but none is installed. You must install peer dependencies yourself.

+ eslint-plugin-react-hooks@4.0.1
updated 1 package and audited 712 packages in 3.669s
@Svish
Copy link
Author

Svish commented May 13, 2020

Just noticed the package.json downloaded from Npm includes "gitHead": "d2f813f8897ffcd2f0b0d2da75d0c44924c92f4d", and checking the package.json for that, it is indeed different than master, yet both says they are "version": "5.2.1".

Confusing and annoying.

🤷‍♂️😕

@stale
Copy link

stale bot commented Jun 12, 2020

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

@stale stale bot added the stale label Jun 12, 2020
@Svish
Copy link
Author

Svish commented Jun 12, 2020

As far as I know, it's still an issue, stale bot.

@stale stale bot removed the stale label Jun 12, 2020
@rtalexk
Copy link

rtalexk commented Jun 14, 2020

I just came with the same issue while trying to create a React App with create-react-app:

➜ npx create-react-app <project-name>

Creating a new React app in .../projects/<project-name>.

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...

npm ERR! code ETARGET
npm ERR! notarget No matching version found for eslint-config-react-app@^5.2.1.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget
npm ERR! notarget It was specified as a dependency of 'react-scripts'
npm ERR! notarget

npm ERR! A complete log of this run can be found in:
npm ERR!     .../.npm/_logs/2020-06-14T16_35_55_267Z-debug.log

Aborting installation.
  npm install --save --save-exact --loglevel error react react-dom react-scripts cra-template has failed.

Deleting generated file... package.json
Deleting <project-name>/ from .../projects/
Done.

Steps to reproduce:

npx create-react-app <project-name>

@Svish
Copy link
Author

Svish commented Jul 14, 2020

Still an issue. And seems to be "worse" too. The whole peerDependencies section seems to be incorrect.

From GitHub repo:

{
  "peerDependencies": {
    "@typescript-eslint/eslint-plugin": "^3.0.0",
    "@typescript-eslint/parser": "^3.0.0",
    "babel-eslint": "^10.0.0",
    "eslint": "^7.0.0",
    "eslint-plugin-flowtype": "^5.0.0",
    "eslint-plugin-import": "^2.21.1",
    "eslint-plugin-jsx-a11y": "^6.3.0",
    "eslint-plugin-react": "^7.20.0",
    "eslint-plugin-react-hooks": "^4.0.1"
  },
}

From NPM via npm pack eslint-config-react-app:

{
  "peerDependencies": {
    "@typescript-eslint/eslint-plugin": "2.x",
    "@typescript-eslint/parser": "2.x",
    "babel-eslint": "10.x",
    "eslint": "6.x",
    "eslint-plugin-flowtype": "3.x || 4.x",
    "eslint-plugin-import": "2.x",
    "eslint-plugin-jsx-a11y": "6.x",
    "eslint-plugin-react": "7.x",
    "eslint-plugin-react-hooks": "1.x || 2.x"
  },
}

@vdumitraskovic
Copy link

I really hope we'll see a new npm publish in a reasonable time.

@stale
Copy link

stale bot commented Aug 29, 2020

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

@stale stale bot added the stale label Aug 29, 2020
@Svish
Copy link
Author

Svish commented Aug 29, 2020

Dear mr. Stale

This projects has not had any new releases since march, so this issue has not been fixed. Please do not close until it has been.

Humbly,
Me

@stale stale bot removed the stale label Aug 29, 2020
@Svish
Copy link
Author

Svish commented Aug 29, 2020

Thank you, most gracious mr. Stale.

@ghost
Copy link

ghost commented Aug 29, 2020

I'm having the same issue right now trying to self-host a bot... not sure what's causing it.

@rob-corell-fivestars
Copy link

Still a problem.

1 similar comment
@hirenbhut93
Copy link

Still a problem.

@quemazote
Copy link

This is why my plugins are not getting loaded in my eslintrc. Still not stale.

@AdamFx990
Copy link

This is still an issue for me too.

@clarkdowding
Copy link

clarkdowding commented Dec 20, 2020

This is still an issue:
npm WARN eslint-config-react-app@5.2.1 requires a peer of eslint-plugin-react-hooks@1.x || 2.x but none is installed. You must install peer dependencies yourself.

bug-example

@iansu
Copy link
Contributor

iansu commented May 19, 2021

This should be resolved in the latest version.

@iansu iansu closed this as completed May 19, 2021
FirePrometheus0109 added a commit to FirePrometheus0109/eslint-config-upleveled that referenced this issue Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants