question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ESLint 6.6.0 does not account for module-hoisting via yarn workspaces when determining path for plugins

See original GitHub issue

Tell us about your environment

Node version: v12.10.0 npm version: v6.2.0 Local ESLint version: Not found – But it is installed (rolled back to 6.5.1 and it’s working fine) Global ESLint version: v6.5.1 (Currently used)

What did you expect to happen? Upgrading from 6.5.1 to should not break linting (specifically seeing this in Sublime Text)

I get an error for the first plugin, no matter what plugin that is. The message I get is like this:

Error: Failed to load plugin 'react' declared in '.eslintrc': ENOENT: no such file or directory, open 'C:\projects\myProject\node_modules\eslint-plugin-react\node_modules\doctrine\lib\doctrine.js'

But we’re using yarn workspaces and lerna and the proper location of that file in our environment after upgrading to 6.6.0 is: C:\projects\myProject\node_modules\doctrine\lib\doctrine.js

What actually happened? Please include the actual, raw output from ESLint.

See error text above.

Are you willing to submit a pull request to fix this bug? Can’t help with resolution.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
fraywingcommented, Dec 2, 2019

I have this same issue after upgrading, but I’m not using Sublime. I don’t think this is an issue with an external plugin. I’m having it while using yarn workspaces and Atom.

1reaction
kaicataldocommented, Nov 30, 2019

With all the moving parts here, it’s a bit of a wild goose chase at the moment. Sounds like it might be beneficial to file an issue with the Sublime plugin you’re using - they might be able to chase this down!

Read more comments on GitHub >

github_iconTop Results From Across the Web

yarn workspace not update the local package (making eslint ...
Problem. I'm making custom eslint plugin referencing working with plugins and generator-eslint. Then I make a monorepo using yarn workspace ...
Read more >
Workspaces - Yarn
Workspaces are a new way to set up your package architecture that's available by default starting from Yarn 1.0. It allows you to...
Read more >
eslint/eslint - Gitter
Try npm ls eslint-plugin-eslint-comments ... I'm using a monorepo with yarn workspaces ... The file does not match your project config: .eslintrc.js.
Read more >
Typescript: Working with Paths, Packages and Yarn Workspaces
We are all accustomed to working with packages as Javascript developers, installing and importing various dependencies that our project requires, ...
Read more >
No yarn workspaces detected despite using workspaces for ...
Hello, netlify doesn't appear to be caching my node_modules properly and takes 3mins before each build retrieving dependencies. build does not fail just...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found