local eslint on windows error
See original GitHub issueeverytime I do npm run eslint I get the error below. However the linting process completes. I don’t have es-lint globally installed could this be why?
eslint version: 3.8.1 node version - 5.4.0 npm version - 3.3.12
.eslintrc.js
module.exports = {
"extends": "airbnb",
"plugins": [
"react",
"jsx-a11y",
"import"
],
"env": {
"browser": true
},
"rules": {
"no-console": 0,
"no-unused-vars": 0,
"linebreak-style": 0
}
};
Package.json
{
"name": "es6",
"version": "1.0.0",
"description": "",
"main": "app.js",
"scripts": {
"eslint": "./node_modules/.bin/eslint app.js"
},
"author": "",
"license": "ISC",
"devDependencies": {
"eslint": "^3.8.1",
"eslint-config-airbnb": "^12.0.0",
"eslint-plugin-import": "^2.0.1",
"eslint-plugin-jsx-a11y": "^2.2.3",
"eslint-plugin-react": "^6.4.1"
}
}
npm ERR! Windows_NT 10.0.10240
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "eslint"
npm ERR! node v5.4.0
npm ERR! npm v3.3.12
npm ERR! code ELIFECYCLE
npm ERR! es6@1.0.0 eslint: `eslint app.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the es6@1.0.0 eslint script 'eslint app.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the es6 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! eslint app.js
npm ERR! You can get their info via:
npm ERR! npm owner ls es6
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! c:\local\ES2015\npm-debug.log
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
ESLint not working in VS Code?
If ESLint is running in the terminal but not inside VSCode, it is probably because the extension is unable to detect both the...
Read more >eslint is not using local config · Issue #636
I have eslint installed globally and locally. However, the vscode plugin is not respecting the local configuration files.
Read more >Local Install of ESLint Breaks In-Editor Linting
From the command line run npm install eslint. Confirm in package. json/package-lock. json that eslint has been installed locally as a dependency.
Read more >ESLint not working in VSCode? Help build a ...
Open the command palette by pressing Ctrl / Cmd + Shift + P and select 'ESLint: Show Output Channel'. If ESLint throws any...
Read more >Command Line Interface
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
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
I have the same issue as @amarbham. As the OP is unresponsive I will answer above mentioned questions.
Q. Does npm run eslint output anything other than what you pasted above? A. Yes, I have standard eslint output (lint warnings, errors, etc.) before npm error info.
Q. What happens if you just use ./node_modules/.bin/eslint app.js manually? A. Exactly the same (standard eslint output, then npm error).
Additional info:
Versions: Windows_NT 10.0.14393 node v6.9.1 npm v3.10.8 eslint v3.13.1 eslint-watch v2.1.14 (optionally)
I tried to run npm scripts using cmder, gitBash, Windows PowerShel and standard Windows console. No difference.
So, please, re-open this issue. I also suggest to rename the issue to something like this: “npm throws an error after ESLint task is completed (on Windows)”
P.S. Output in debug mode:
Hi @amarbham, thanks for the issue. It looks like there’s not enough information for us to know how to help you.
If you’re reporting a bug, please be sure to include:
eslint -v
)Requesting a new rule? Please see Proposing a New Rule for instructions.
Requesting a rule change? Please see Proposing a Rule Change for instructions.
If it’s something else, please just provide as much additional information as possible. Thanks!