'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
npx eslint --help
For yarn use :
yarn eslint --help
- This answer is updated to include
- This issue is related to modules installed locally.
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)