I encountered this error message when I opened a NodeJS project using Visual Studio Code:
Failed to load the ESLint library for the document
As prompted, install ESlint using the command line NPM install -g eslint,
Re-open Visual Studio Code after installation and the error disappears: