Cannot find module 'eslint/lib/util/traverser'
See original GitHub issueTell us about your environment
- ESLint Version: v6.0.0
- Node Version: v10.16.0
- npm Version: 6.9.0
What parser (default, Babel-ESLint, etc.) are you using? @typescript-eslint/parser
Please show your full configuration:
Is a .eslintrc.js
file
module.exports = {
parser: "@typescript-eslint/parser",
extends: [
"plugin:@typescript-eslint/recommended", // Uses the recommended rules from the @typescript-eslint/eslint-plugin
"plugin:react/recommended", // Uses the recommended rules from @eslint-plugin-react
"prettier/@typescript-eslint", // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
"plugin:prettier/recommended" // Enables eslint-plugin-prettier and eslint-config-prettier. This will display prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
],
parserOptions: {
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
sourceType: "module", // Allows for the use of imports
ecmaFeatures: {
jsx: 1 // Allows for the parsing of JSX
}
},
rules: {
"react/prop-types": 0,
"@typescript-eslint/camelcase": 0,
"react/display-name": 0,
"@typescript-eslint/no-non-null-assertion": 0,
"@typescript-eslint/explicit-member-accessibility": 0,
"jsx-boolean-value": 0,
ban: 0,
"class-name": 1,
"comment-format": [1, "check-space"],
curly: 1,
eofline: 0,
forin: 1,
"interface-name": [1, "never-prefix"],
"jsdoc-format": 1,
"jsx-no-lambda": 0,
"jsx-no-multiline-js": 0,
"label-position": 1,
"max-line-length": [0, 500],
"member-ordering": [
1,
{
order: "fields-first"
}
],
"no-any": 1,
"no-arg": 1,
"no-bitwise": 1,
"no-console": ["warn", { allow: ["warn", "error"] }],
"no-debugger": "warn",
"no-consecutive-blank-lines": 1,
"no-construct": 1,
"no-empty": 1,
"no-eval": 1,
"no-nested-ternary": "warn",
"no-shadowed-variable": 1,
"no-switch-case-fall-through": 1,
"no-unused-expression": 1,
"no-use-before-declare": 1,
"one-line": [
1,
"check-catch",
"check-else",
"check-open-brace",
"check-whitespace"
],
quotemark: [1, "double", "jsx-double"],
semicolon: [1, "always", "ignore-bound-class-methods"],
"switch-default": 1,
"prefer-const": [
"error",
{
destructuring: "all"
}
],
"trailing-comma": [1],
"triple-equals": [1, "allow-null-check"],
typedef: [1, "parameter", "property-declaration"],
"typedef-whitespace": [
1,
{
"call-signature": "nospace",
"index-signature": "nospace",
parameter: "nospace",
"property-declaration": "nospace",
"variable-declaration": "nospace"
}
],
"variable-name": [
1,
"ban-keywords",
"check-format",
"allow-leading-underscore",
"allow-pascal-case"
],
whitespace: [
1,
"check-branch",
"check-decl",
"check-module",
"check-operator",
"check-separator",
"check-type",
"check-typecast"
],
radix: 0,
"unified-signatures": 1,
"await-promise": 1,
"ban-comma-operator": 1,
"no-conditional-assignment": 1,
"no-duplicate-super": 1,
"no-duplicate-switch-case": 1,
"no-invalid-template-strings": 1,
"no-misused-new": 1,
"no-object-literal-type-assertion": 1,
"no-return-await": 1,
"no-sparse-arrays": 1,
"no-string-throw": 1,
"no-this-assignment": 1,
"no-unsafe-finally": 2,
"no-var-keyword": 1,
"use-default-type-parameter": 1,
"use-isnan": 1,
"strict-type-predicates": 1,
"restrict-plus-operands": 1,
"prefer-conditional-expression": 1,
}
};
After updating to version 6 (before it works perfectly) i start to have this error:
Error: Failed to load parser '@typescript-eslint/parser' declared in '.eslintrc.js': Cannot find module 'eslint/lib/util/traverser'
I’ve also tried to install package eslint-traverse
but without success.
Any clues on this? Thanks! 😃
Issue Analytics
- State:
- Created 4 years ago
- Comments:5
Top Results From Across the Web
eslint error from vue Error: Cannot find module 'eslint/lib/ast-utils'
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...
Read more >解决: Cannot find module 'eslint/lib/util/traverser' - CSDN博客
Error: Failed to load plugin 'vue' declared in '.eslintrc.js': Cannot find module 'eslint/lib/util/traverser'. Require stack:.
Read more >Cannot find module '@typescript-eslint/eslint-config' - YouTrack
Cannot find module '@typescript-eslint/eslint-config': unclear in what error refers · Create project in IntelliJ IDEA family IDE (checked and confirmed: Ruby ...
Read more >Top 5 eslint-visitor-keys Code Examples - Snyk
To help you get started, we've selected a few eslint-visitor-keys examples, based on popular ways it is used in public projects.
Read more >eslint 8.30.0-1 (any) - File List - Arch Linux
usr/; usr/bin/; usr/bin/eslint; usr/lib/; usr/lib/node_modules/ ... usr/lib/node_modules/eslint/messages/extend-config-missing.js ...
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 Free
Top 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
I also have this issue and have not found a solution. Please update with the solution if you found one.
So… What was wrong? Please post solutions, don’t just leave 😿