Terminal not recognizing ESLint as a command
See original GitHub issue2017 MacBook 12", macOS Sierra 10.12.6
- ESLint Version: 4.19.1
- Node Version: 10.4.1
- npm Version: 6.1.0
What parser (default, Babel-ESLint, etc.) are you using?
Default
Please show your full configuration:
No config. Issues at install.
What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.
No source.
eslint --init
What did you expect to happen? ESLint should have made a local configuration.
What actually happened? Please include the actual, raw output from ESLint.
-bash: eslint: command not found
This is the weird part. ESLint shows that it’s fully installed and up and running:
[Info - 12:27:03] ESLint server is running.
[Info - 12:27:04] ESLint library loaded from: /fakepath/node_modules/eslint/lib/api.js
[Warn - 12:27:04]
No ESLint configuration (e.g .eslintrc) found for file: /fakepath/index.js
File will not be validated. Consider running 'eslint --init' in the workspace folder Workspace
Alternatively you can disable ESLint by executing the 'Disable ESLint' command.
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
'eslint' is not recognized as an internal or external command
'eslint' is not recognized as an internal or external command · 2. Use npm ls -g to get the location where your globals...
Read more >Command Line Interface - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >eslint work in terminal but doesn't show errors highlighted in ...
It runs in terminal when doing. eslint src/. but in vscode error are not highlighted or shown! my configuration file .eslintrc.js.
Read more >ESLint not working in VSCode – possible fixes - LinuxPip
1 Run npm install? · 2 Restart VSCode · 3 Install ESLint + Plugins + Presets? · 4 Make sure ESLint work for...
Read more >ESLint not working in VSCode? Help build a troubleshooting ...
The ESLint plugin requires permission to execute the local ESLint installation from your node_modules . Open the command palette ( Ctrl ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can run commands in
node_modules
usingnpx
:https://stackoverflow.com/a/45164863
Hmm.
npm install --save eslint
would have made the binary available only under./node_modules/.bin/eslint
(relative to your project root), soeslint
shouldn’t have worked. But a global install should have made it work.Can you run ESLint on the command line? If so, the problem is with your VSCode configuration…