'eslint' is not recognized as an internal or external command

Well, if you are a Windows user and installing eslint-cli is not working for you, try :

node node_modules\eslint\bin\eslint.js --help

Or, you can use npx which lets you run local commands in node_modules/.bin :

npx eslint --help

For yarn use :

yarn eslint --help


  1. This answer is updated to include yarn and npx.
  2. This issue is related to modules installed locally.

The eslint module must not be installed into global.

instead, you should install eslint-cli module into global.

So, first install eslint-cli gloablly:

npm -g i eslint-cli

then in the project folder: install eslint locally

npm i eslint --save-dev

Then in the project folder you can run someting like: (on Windows)

eslint .\