I'm trying to install eslint & run it in vs code. I ran this command:
npm i -g eslint
and it seemed to work, but I keep keep getting a "'eslint' is not recognized as an internal or external command" error when I try & run eslint. What gives?
I'm trying to install eslint & run it in vs code. I ran this command:
npm i -g eslint
and it seemed to work, but I keep keep getting a "'eslint' is not recognized as an internal or external command" error when I try & run eslint. What gives?
The
eslint
module must not be installed into global.instead, you should install
eslint-cli
module into global.So, first install eslint-cli gloablly:
then in the project folder: install eslint locally
Then in the project folder you can run someting like: (on Windows)
Well, if you are a Windows user and installing
eslint-cli
not working for you, try using:it solves my problem.