I'm trying to run eslint on my code but am getting the following error:
> vue-cli-service lint; vue-cli-service test
ERROR Error: Cannot find module 'eslint/lib/ast-utils'
Referenced from: /Users/username/Development/project/tests/e2e/.eslintrc
Error: Cannot find module 'eslint/lib/ast-utils'
Referenced from: /Users/username/Development/project/tests/e2e/.eslintrc
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/Users/username/Development/project/node_modules/eslint-plugin-protractor/lib/rules/array-callback-return.js:8:16)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
Versions:
"@babel/core": "^7.1.0",
"@babel/plugin-syntax-flow": "^7.0.0",
"@babel/preset-flow": "^7.0.0",
"@babel/plugin-transform-flow-strip-types": "^7.0.0",
"@vue/cli-plugin-babel": "^3.0.5",
"@vue/cli-plugin-eslint": "^3.0.5",
"@vue/cli-plugin-unit-jest": "^3.0.5",
"@vue/cli-service": "^3.0.5",
"@vue/test-utils": "^1.0.0-beta.25",
"babel-eslint": "^10.0.1",
"babel-jest": "^23.6.0",
"babel-loader": "^8.0.2",
"eslint": "^5.6.1",
"eslint-config-sagely": "git+ssh://[email protected]/sagely/eslint-config-sagely.git",
"eslint-plugin-flowtype": "^2.50.3",
"eslint-plugin-flowtype-errors": "^3.6.0",
"eslint-plugin-vue": "^4.7.1",
What am I missing here?
In my case I got a similar Error: Cannot find module 'eslint/lib/rules/utils/ast-utils'
and I needed to upgrade eslint - v5 to v7 worked for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With