I had a difficult time tracking this down, so I'm posting to help others who search for a similar error.
I decided to set up a new project on Ubuntu 18.04 in Atom with eslint and Node.js.
ESlint, by itself, installed and ran just fine with my config extending eslint:recommended
, but when I installed eslint-config-airbnb-base
and changed my config to extend airbnb-base
, I started getting an error in Atom and it would not parse my files.
Error while running ESLint: createRequire is not a function.
Removing airbnb and relying on eslint-plugin-import
gave a similar error:
Error while running ESLint: Failed to load plugin 'import' declared in '.eslintrc.yaml': createRequire is not a function.
However, running eslint on the command-line worked fine.