Run eslint ./src throws an error, how to fix?

Gives an error Error: Cannot find module 'babel-eslint', when it is installed this dependency
Here package
{
"name": "forwp",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"dev": "webpack-dev-server --development-mode --open",
"build": "webpack --mode production"
},
"author": "",
"license": "ISC",
"devDependencies": {
"autoprefixer": "^9.1.5",
"babel-core": "^6.26.3",
"babel-eslint": "^10.0.1",
"babel-loader": "^7.1.5",
"babel-preset-env": "^1.7.0",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-3": "^6.24.1",
"css-loader": "^1.0.0",
"eslint": "^5.6.1",
"eslint-config-prettier": "^3.1.0",
"eslint-plugin-babel": "^5.2.1",
"eslint-plugin-prettier": "^3.0.0",
"extract-text-webpack-plugin": "^4.0.0-beta.0",
"postcss-loader": "^3.0.0",
"prettier": "^1.14.3",
"style-loader": "^0.23.0",
"webpack": "^4.17.2",
"webpack-cli": "^3.1.0",
"webpack-dev-server": "^3.1.8"
},
"dependencies": {
"browserslist": "^4.1.1",
"node-sass": "^4.9.3",
"prop-types": "^15.6.2",
"react": "^16.5.1",
"react-dom": "^16.5.1",
"sass-loader": "^7.1.0"
},
"browserslist": [
"last version 4",
"> 1%",
"not ie <= 9"
]
}

Here eslintrc

{
"extends":[
"react-app",
"prettier"
],
"rules":{
"prettier/prettier": "error",
"strict": 0
},
"parser": "babel-eslint",
"parserOptions": {
"sourceType": "module",
"allowImportExportEverywhere": false,
"codeFrame": true,
"ecmaFeatures": {
"jsx": true
}
},
"env": {
"browser": true,
"node": true
},
"plugins":[
"prettier",
"babel"
]
}
March 12th 20 at 08:04
1 answer
March 12th 20 at 08:06
So it should work
./node_modules/.bin/eslint ./src

The reason for trying to start a global module eslint who does not know your local(installed on the project) plugins.

Not to write each time such a long way
in package.json add
"scripts": {
"dev": "webpack-dev-server --development-mode --open",
"build": "webpack --mode production",
"eslint": "eslint"
}


and then call it from the console npm run eslint ./src
I have rebuilt everything on the LAN:) - Wallace.Fadel commented on March 12th 20 at 08:09

Find more questions by tags Linter