Upgrading a project to eslint 7.0.0 causes linting to fail with "Error while running ESLint: createRequire is not a function:"
bjmiller opened this issue · 2 comments
bjmiller commented
Issue Type
Bug
Issue Description
Upgrading a project to eslint 7.0.0 causes linting to fail with "Error while running ESLint: createRequire is not a function:"
Bug Checklist
- Restart Atom
- Verify the
eslint
CLI gives the proper result, whilelinter-eslint
does not - Paste the output of the
Linter Eslint: Debug
command from the Command Palette below
Atom version: 1.46.0
linter-eslint version: 8.5.5
ESLint version: 7.0.0
Hours since last Atom restart: 0.3
Platform: darwin
Using local project ESLint from: /Users/b.miller/Developer/discovery/node_modules/eslint
Current file's scopes: [
"source.tsx",
"meta.var.expr.tsx",
"meta.objectliteral.tsx",
"meta.object.member.tsx",
"meta.brace.round.tsx"
]
linter-eslint configuration: {
"autofix": {
"fixOnSave": true,
"ignoreFixableRulesWhileTyping": false,
"rulesToDisableWhileFixing": []
},
"disabling": {
"disableWhenNoEslintConfig": true,
"rulesToSilenceWhileTyping": []
},
"scopes": [
"source.js",
"source.jsx",
"source.js.jsx",
"source.flow",
"source.babel",
"source.js-semantic",
"source.ts",
"source.tsx",
"typescript"
],
"lintHtmlFiles": false,
"global": {
"useGlobalEslint": false,
"eslintrcPath": "",
"globalNodePath": ""
},
"advanced": {
"disableEslintIgnore": false,
"disableFSCache": false,
"showRuleIdInMessage": true,
"eslintRulesDirs": [],
"localNodeModules": ""
}
}
bjmiller commented
I've discovered the issue. ESLint has, either intentionally or accidentally, dropped support for Node < 12. So, I'll have to wait until the next release of Atom, which updates Electron, which in turn updated Node to v12.
hersh-kat commented
Experiencing the same issue. Is there any workaround? I tried downgrading eslint to 6.8 but still no luck. Currently using latest stable release of node.