Failed to load the ESLint library for the document when eslint is installed by yarn
See original GitHub issueI’m seeing Failed to load the ESLint library for the document when eslint is installed by yarn. I have configured the following -
🐍 $ yarn global add eslint
yarn global v1.1.0
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
warning Pattern ["eslint@^4.14.0"] is trying to unpack in the same destination "/Users/junger/Library/Caches/Yarn/v1/npm-eslint-4.14.0-96609768d1dd23304faba2d94b7fefe5a5447a82" as pattern ["eslint@^4.0.0"]. This could result in a non deterministic behavior, skipping.
[3/4] 🔗 Linking dependencies...
[4/4] 📃 Building fresh packages...
success Installed "eslint@4.14.0" with binaries:
- eslint
✨ Done in 2.59s.
~/.config/yarn/global
🐯 $ ls -la /usr/local/bin/eslint
lrwxr-xr-x 1 junger admin 75 Dec 19 15:29 /usr/local/bin/eslint -> ../../../Users/junger/.config/yarn/global/node_modules/eslint/bin/eslint.js
~/.config/yarn/global
To find the node path I did -
🐮 $ which node
/Users/junger/.nvm/versions/node/v8.9.3/bin/node
And then in settings.json
set the following
"eslint.nodePath": "/Users/junger/.nvm/versions/node/v8.9.3/bin/node",
Then I receive this error message -
[Info - 06:27:58]
Failed to load the ESLint library for the document /Users/junger/dev/stanley/shedview/configurator/src/middleware/analytics-middleware.js
To use ESLint please install eslint by running 'npm install eslint' in the workspace folder stanley
or globally using 'npm install -g eslint'. You need to reopen the workspace after installing eslint.
Alternatively you can disable ESLint for the workspace folder stanley by executing the 'Disable ESLint' command.
Is yarn installation of eslint supported?
Issue Analytics
- State:
- Created 6 years ago
- Comments:13 (10 by maintainers)
Top Results From Across the Web
ESLint not working in VS Code? - Stack Overflow
If it shows Failed to load the ESLint library for the document {documentName}.js -or- if the Problems tab shows an error or a...
Read more >Configuration Files - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >eslint | Yarn - Package Manager
ESLint is a tool for identifying and reporting on patterns found in ECMAScript/JavaScript code. In many ways, it is similar to JSLint and...
Read more >[eslint] failed to load plugin 'prettier' declared in '.eslintrc.js'
The plugin name is spelled incorrectly in an ESLint configuration file (e.g. .eslintrc). 2. If ESLint is installed globally, then make sure 'eslint-plugin- ......
Read more >ESLint not working in VSCode? Help build a troubleshooting ...
Did you install ESLint + Plugins + Presets? ... Take a look into your eslintrc configuration file and make a list of all...
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 FreeTop 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
Top GitHub Comments
Argh looks like this setting fixed it -
Maybe it could just autodetect / try both?
Someone stumbling upon this problem in 2021: Add following to
.vscode/settings.json
And also, add
@yarnpkg/sdks
to your dependenciesAnd then:
Should wrap the ESLint with
pnp.js
supplied properly. Please restart VS code afterwards.