eslint installation warnings. Need Clarification - eslint

In following a tutorial, I ran the following command to install eslint airbnb and a few dependencies
$ sudo npm install -g eslint-config-airbnb eslint-plugin-import eslint-plugin-react eslint-plugin-jsx-a11y
Upon completion I received a number of warnings
npm WARN eslint-plugin-react#7.6.0 requires a peer of eslint#^3.0.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-import#2.8.0 requires a peer of eslint#2.x - 4.x but none is installed. You must install peer dependencies yourself.
npm WARN eslint-configeslint-config-airbnb-airbnb#16.1.0 requires a peer of eslint#^4.9.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-config-airbnb-base#12.1.0 requires a peer of eslint#^4.9.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-jsx-a11y#6.0.3 requires a peer of eslint#^3 || ^4 but none is installed. You must install peer dependencies yourself.
Ok, so.... I'm beginning to think the tutorial is outdated and something has changed. What (if anything) am I missing?
Please advise.

Each node package has dependencies it works perfectly or has been tested with hence the warning you get since they are the ones that are recommended or declared in the packages configs . Hence the warnings. It is recommended to follow the required packages to avoid errors, but most of the time unless you get an error then you should be good to go as the the alluded to package itself at whatever version exists.
In your case confirm you have eslint in you package.json, if not run:
npm install eslint --save-dev

All the warning are about peer dependencies. They are categorised as WARN instead of ERROR, because if your application code never touch such a dependency, you will be good. Fully tested code can ensure that these warnings can be safely ignored.
Excellent explanation to peer dependency

Related

NPM warning node-fetch #2.6.7 Requires a peer of encoding#^0.1.0 but none was installed

NPM warning node-fetch #2.6.7
Requires a peer of encoding#^0.1.0 but none was installed.
peer dependency means that it need the library and you must install that dependency by yourself:
npm i encoding#0.1.0

Not able to uninstall outdated, probably unused NPM packages

I am trying to revive the React project of an ASP.net solution. I managed to clean up the package.json, but I am not able to remove two packages, which are neither used in the project nor defined in the package.json.
Two packages refuse deletion: The output of npm uninstall react-hammerjs still reads
npm WARN react-slick#0.14.11 requires a peer of react#^0.14.0 || ^15.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN react-slick#0.14.11 requires a peer of react-dom#^0.14.0 || ^15.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN react-hammerjs#0.5.0 requires a peer of react#^0.14.3 || ^15.0.0 but none is installed. You must install peer dependencies yourself.
Is this behavior expected?
The workaround to simply delete the corresponding subfolders within node_modules to remove react-slick#0.14.11 or react-hammerjs#0.5.0 is also not possible since no such directories exists. How do I proceed now?
PS: According to npm show react version I have version 16.9.0 of React if that matters.
Related questions:
NPM uninstall packages not working
Not able to uninstall NVM packages
In contrast to my previous assumption, the two packages are actually used by antd as a npm ls <package-name> revealed:
>npm ls react-hammerjs
ui#1.3.3.7 C:\myProjectUI
`-- antd#2.10.0
`-- rc-tabs#7.3.4
`-- react-hammerjs#0.5.0
>npm ls react-slick
ui#1.3.3.7 C:\myProjectUI
`-- antd#2.10.0
`-- react-slick#0.14.11
The issue was resolved with by updating the parent packages npm install --save antd#latest.

Requires peer of graphql, but it's installed

I'm currently trying to generate a prisma.graphql file from my .graphqlconfig.yml, but I can't install globally npm i -g graphql-binding or npm i -g prisma-binding as I'm getting the following errors:
npm WARN graphql-binding#2.2.6 requires a peer of graphql#^0.11.0 || ^0.12.0 || ^0.13.0 but none is installed. You must install peer dependencies yourself.
npm WARN graphql-import#0.5.3 requires a peer of graphql#^0.11.0 || ^0.12.0 || ^0.13.0 but none is installed. You must install peer dependencies yourself.
npm WARN graphql-tools#3.1.0 requires a peer of graphql#^0.13.0 but none is installed. You must installpeer dependencies yourself.
npm WARN apollo-link#1.2.3 requires a peer of graphql#^0.11.3 || ^0.12.3 || ^0.13.0 || ^14.0.0 but noneis installed. You must install peer dependencies yourself.
So I obviously installed graphql at a ^0.13 version with:
npm i -g graphql#0.13
This runs successfully, but the graphql bindings keep failing to install.
The command I need to run is:
graphql codegen
But without installing the bindings I'm not able to run it.
Any suggestion on how to solve this is welcome :)
EDIT
Using npx I managed to run
npx graphql codegen

strange error 'npm WARN express-validation#1.0.2 requires a peer of joi#* but none is installed...?

What does 'npm WARN express-validation#1.0.2 requires a peer of joi#* but none is installed. You must install peer dependencies yourself.' mean? And how can I solve it?
when i run:
npm install express-validation --save
I get:
npm WARN express-validation#1.0.2 requires a peer of joi#* but none is installed. You must install peer dependencies yourself.
so then i run:
npm install -g npm-install-peers
then:
npm-install-peers
then I get:
This package doesn't seem to have any peerDependencies
so then i run:
npm install express-validation --save
I get:
npm WARN express-validation#1.0.2 requires a peer of joi#* but none is installed. You must install peer dependencies yourself.
You can install it yourself with npm install joi --save
The package name is wrong. If you are trying to validate data in your app you should consider start looking for express-validator.
Express-validation requires a peer of joy and i dont know what both means.

Resolve peerDependencies warnings?

I have a React + WebPack project, when I install the npm dependencies I get some warnings about unsatisfied peerDependencies:
$ npm install
npm WARN carte-blanche#0.2.1 requires a peer of webpack#>=1 <3 but none was installed.
npm WARN carte-blanche-react-plugin#0.2.1 requires a peer of webpack#>=1 <3 but none was installed.
npm WARN carte-blanche-react-plugin#0.1.3 requires a peer of carte-blanche#^0.1.0 but none was installed.
npm WARN carte-blanche-react-plugin#0.1.3 requires a peer of webpack#>=1 <3 but none was installed.
npm WARN extract-text-webpack-plugin#1.0.1 requires a peer of webpack#^1.9.11 but none was installed.
npm WARN karma-webpack#1.7.0 requires a peer of webpack#^1.4.0 but none was installed.
npm WARN react-overlays#0.5.4 requires a peer of react-dom#^0.14.0 but none was installed.
npm WARN react-simpletabs#0.6.1 requires a peer of react#0.12.x - 1.x but none was installed.
Everything works as expected, but I get these warnings and I can't find a way to resolve them.
I have tried manually installing (for instance) webpack manually, but nothing changes at all.

Resources