Page MenuHomePhabricator

Invalid peer dependencies between eslint and plugins
Closed, ResolvedPublic


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 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/
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
npm WARN deprecated kad-memstore@0.0.1: Please upgrade to @kadenceproject/kadence - See
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! 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

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

mobrovac added a subscriber: mobrovac.

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