eslint-config-standard: dependencies need to be updated (unable to resolve dependency tree)
What version of this package are you using?
eslint-config-standard v16.0.2
What operating system, Node.js, and npm version?
node v15.14.0 and npm v7.9.0
What happened?
Since the release of eslint-plugin-promise v5.1.0 it’s impossible to install npm packages:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: eslint-plugin-promise@5.1.0
npm ERR! node_modules/eslint-plugin-promise
npm ERR! dev eslint-plugin-promise@"5.1.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint-plugin-promise@"^4.2.1" from eslint-config-standard@16.0.2
npm ERR! node_modules/eslint-config-standard
npm ERR! dev eslint-config-standard@"16.0.2" from the root project
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 /Users/jimblue/.cache/npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/jimblue/.cache/npm/_logs/2021-04-15T20_56_15_512Z-debug.log
What did you expect to happen?
eslint-config-standard npm dependencies should be updated to fix this.
Are you willing to submit a pull request to fix this bug?
Sure if someone can merge it and create a new eslint-config-standard npm release 😄 !
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 12
- Comments: 17 (8 by maintainers)
From what I can read it seems that you want us to upgrade
eslint-plugin-promiseto 5.x, is that correct?Yep, it could be cool if we could merge #183 and release a new minor version! 😄
@JustFly1984 Fix by swapping to the correct current peer dependency, unless that causes you some other issue:
If you use a service such as Dependabot, it consistently tells us to bump
eslint-plugin-promisetov5.1.0, it is only after explicitly updating tov5.1.0that issues are encountered. Doing a clean install ofeslint-config-standardwill not cause problems, only updating versions of peer dependencies.Updating to
v5.1.0causes phantom installation errors on a clean install or upgrade, but notnpm installifnode_modulesalready exists. It is only causing problems when it is manually installed above the current major ineslint-config-standardin thepackage.jsonthat it leads to resolution errors.Yes, it needs proper time to be updated and confirm that everything is still working as intended or if it needs to be scheduled as a major or minor patch, which is what is happening in #183 as far as I can tell. I believe this was to get that ball rolling for sure and make sure everyone is on the same page searching for this error, not for sudden changes overnight. This package is distributed through npm, it cannot be expected that everyone will use legacy options and outdated versions. They may not exist in the future, either. Legacy tends to become a legacy. This issue was made to bring attention to the problem so it can be known and worked on resolving it. The new version resolution is going to change everything going forward and make not keeping up to date all the more problematic for developers.
It is impossible to install
eslint-config-standardor upgrade your dependency tree, unless you are using outdated versions or bypassing the new intended installation method.Looking at the flip side, if someone tried to use a horribly outdated version of node and npm, they would be told to upgrade as it is out of your supported versions. If you are outdated? We get told to use legacy package manager flags or versions. At least that is how I interpreted it.
Indeed, doing
npm install -D eslint-plugin-promisewill installeslint-plugin-promise@4.3.1but the current latest version is5.1.0, might be a bug withnpm, I don’t really know, see the package page: https://www.npmjs.com/package/eslint-plugin-promise.In my opinion, this package should support most up to date, plugins/package it is actually using, so we should; support the latest version of
eslint-plugin-promisewithnpm@7. @voxpelliI think this needs a “step to reproduce”. I just tried this with Node
16.0.0and npm7.10.0:mkdir test-npm7-standardcd test-npm7-standardnpm initnpm install -D eslint-config-standardResulting package.json
If I continue and then do:
npm install -D eslint-plugin-promiseeslint-plugin-promise@4.3.1was installedResulting package.json
To get all correct peer dependencies I can use the third party
install-peerdepsand do:npx install-peerdeps --dev eslint-config-standardResulting package.json
All in all: I’m not sure what is broken? I don’t believe npm 7.10.0 has changed anything relevant to this and Node 16 or 15 doesn’t matter.
The only thing I can think of that causes you a problem is if you installed a too new
eslint-plugin-promiseprior to upgrading to npm 7 and npm 7 now correctly points out that you are using an unsupported version ofeslint-plugin-promise?Then do a
npx install-peerdeps --dev eslint-config-standardand you will be back in sync.