Page MenuHomePhabricator

Invalid peer dependencies between eslint and plugins
Closed, ResolvedPublic

Description

Doing a fresh npm install on a citoid checkout loudly errors out because of eslint-config-node-services and eslint-plugin-jsdoc having incompatible version requirements for eslint, compared to our installed version.

They both want 4.x releases, and we have ^5.9.0 required as of a month ago. See: fd1332a308d84847cce6a8fe0b88efb60a713951

vagrant@vagrantnew:/vagrant/srv/citoid$ npm i
npm WARN deprecated istanbul@0.4.5: This module is no longer maintained, try this instead:
npm WARN deprecated   npm i nyc
npm WARN deprecated Visit https://istanbul.js.org/integrations for other alternatives.
npm WARN peerDependencies The peer dependency eslint@^4.12.0 included from eslint-config-node-services will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
-
> dtrace-provider@0.8.7 install /vagrant/srv/citoid/node_modules/bunyan/node_modules/dtrace-provider
> node-gyp rebuild || node suppress-error.js

make: Entering directory '/vagrant/srv/citoid/node_modules/bunyan/node_modules/dtrace-provider/build'
  TOUCH Release/obj.target/DTraceProviderStub.stamp
make: Leaving directory '/vagrant/srv/citoid/node_modules/bunyan/node_modules/dtrace-provider/build'
npm WARN deprecated kad-fs@0.0.4: Please upgrade to @kadenceproject/kadence - See https://kadence.github.io
npm WARN deprecated kad-memstore@0.0.1: Please upgrade to @kadenceproject/kadence - See https://kadence.github.io
npm ERR! Linux 4.9.0-8-amd64
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "i"
npm ERR! node v10.15.3
npm ERR! npm  v2.15.12
npm ERR! code EPEERINVALID

npm ERR! peerinvalid The package eslint@5.15.1 does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer eslint-config-node-services@2.2.5 wants eslint@^4.12.0
npm ERR! peerinvalid Peer eslint-plugin-jsdoc@3.15.1 wants eslint@>=4.14.0

npm ERR! Please include the following file with any support request:
npm ERR!     /vagrant/srv/citoid/npm-debug.log

Event Timeline

The eslint-config-node-services issue is "simply" solved by switching to eslint-config-wikimedia with the server profile (happy to write the patch), but that doesn't fix your eslint-plugin-jsdoc issue.

Change 496878 had a related patch set uploaded (by Holger Knust; owner: Holger Knust):
[mediawiki/services/citoid@master] Citoid: Fixed invalid peer deps

https://gerrit.wikimedia.org/r/496878

Change 496878 merged by jenkins-bot:
[mediawiki/services/citoid@master] Citoid: Fixed invalid peer deps

https://gerrit.wikimedia.org/r/496878

mobrovac added a subscriber: mobrovac.

The fix has landed in master. A fresh npm install should work now.