admin管理员组文章数量:1304579
I'm creating a project following this tutorial: Full Stack Web App using Vue.js & Express.js: Part 1 - Intro
I ran the next mand: "npm start" which was configured in my package.json like this:
"scripts": {
"start": "./node_modules/nodemon/bin/nodemon.js src/app.js --exec 'npm run lint && node'",
"lint": "./node_modules/.bin/eslint **/*.js"
},
But ESLint throws the next error:
Oops! Something went wrong! :(
ESLint: 5.0.1. No files matching the pattern "node_modules/ipaddr.js" were found. Please check for typing mistakes in the pattern.
npm ERR! code ELIFECYCLE npm ERR! errno 2 npm ERR! [email protected] lint: `eslint **/*.js` npm ERR! Exit status 2 npm ERR! npm ERR! Failed at the [email protected] lint script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A plete log of this run can be found in: npm ERR! /home/ironman/.npm/_logs/2018-06-26T13_45_13_295Z-debug.log [nodemon] process failed, unhandled exit code (2) [nodemon] Error
at Bus.utils.bus.on (/home/ironman/Documentos/Sandbox/Vuexpress/server/node_modules/nodemon/lib/nodemon.js:148:25)
at Bus.emit (events.js:187:15)
at ChildProcess.<anonymous> (/home/ironman/Documentos/Sandbox/Vuexpress/server/node_modules/nodemon/lib/monitor/run.js:164:11)
at ChildProcess.emit (events.js:182:13)
at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
I know there is another thread asked yesterday but i can't ment on it unless i have 50 reputation. Also, joknawe points out that maybe eslint is trying to lint my node_modules directory but i don't know how to ignore it.
Is there any way to solve this issue ?
I'm creating a project following this tutorial: Full Stack Web App using Vue.js & Express.js: Part 1 - Intro
I ran the next mand: "npm start" which was configured in my package.json like this:
"scripts": {
"start": "./node_modules/nodemon/bin/nodemon.js src/app.js --exec 'npm run lint && node'",
"lint": "./node_modules/.bin/eslint **/*.js"
},
But ESLint throws the next error:
Oops! Something went wrong! :(
ESLint: 5.0.1. No files matching the pattern "node_modules/ipaddr.js" were found. Please check for typing mistakes in the pattern.
npm ERR! code ELIFECYCLE npm ERR! errno 2 npm ERR! [email protected] lint: `eslint **/*.js` npm ERR! Exit status 2 npm ERR! npm ERR! Failed at the [email protected] lint script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A plete log of this run can be found in: npm ERR! /home/ironman/.npm/_logs/2018-06-26T13_45_13_295Z-debug.log [nodemon] process failed, unhandled exit code (2) [nodemon] Error
at Bus.utils.bus.on (/home/ironman/Documentos/Sandbox/Vuexpress/server/node_modules/nodemon/lib/nodemon.js:148:25)
at Bus.emit (events.js:187:15)
at ChildProcess.<anonymous> (/home/ironman/Documentos/Sandbox/Vuexpress/server/node_modules/nodemon/lib/monitor/run.js:164:11)
at ChildProcess.emit (events.js:182:13)
at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
I know there is another thread asked yesterday but i can't ment on it unless i have 50 reputation. Also, joknawe points out that maybe eslint is trying to lint my node_modules directory but i don't know how to ignore it.
Is there any way to solve this issue ?
Share Improve this question edited Jun 26, 2018 at 13:57 tourist 4,3337 gold badges27 silver badges48 bronze badges asked Jun 26, 2018 at 13:54 enbermudasenbermudas 1,6154 gold badges23 silver badges44 bronze badges 4- Create an eslint ignore file: stackoverflow./a/46947250/977192 – karllhughes Commented Jun 26, 2018 at 13:58
- 1 I've created that file ignoring "/node_modules" but it does not work. – enbermudas Commented Jun 26, 2018 at 14:11
- 1 @karllhughes that does not work on eslint v5 – Player1 Commented Jun 26, 2018 at 15:05
- @EnriqueBermúdez, did you solve the issue in the end? Could you plete the tutorial? – msoutopico Commented Nov 15, 2019 at 3:38
3 Answers
Reset to default 6Below worked:
// Pass on both Windows & Ubuntu.
// Note the slash & double quotes
// File: package.json:
"scripts": {
"lint": "eslint \"./**/*.js\"",
}
Below didn't work, on one of the OS:
// Windows - Fail - "Oops! Something went wrong! :("
// Note the single quotes
"lint": "eslint './**/*.js'",
// Ubuntu - Fail
// Note no quotes
"lint": "eslint ./**/*.js",
Hope that helps.
I've solved the exact same issue by changing
"lint": "./node_modules/.bin/eslint **/*.js"
to
"lint": "./node_modules/.bin/eslint src/*.js"
Hope this help.
I had the same issue. Worked fine under Windows, but failed during build-job (Ubuntu). Quote the pattern and it works fine as in previous versions of eslint
"lint": "./node_modules/.bin/eslint \"**/*.js\""
Credit goes to https://github./eslint/eslint/issues/10599
本文标签: javascriptESLint 501 ErrorStack Overflow
版权声明:本文标题:javascript - ESLint: 5.0.1 Error - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741784312a2397494.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论