Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working with Yarn Berry #336

Open
LvChengbin opened this issue Feb 6, 2025 · 0 comments
Open

Not working with Yarn Berry #336

LvChengbin opened this issue Feb 6, 2025 · 0 comments

Comments

@LvChengbin
Copy link

eslint_d.js/lib/launcher.js

Lines 136 to 153 in 1c83c4a

const watcher = fs
.watch(base)
.on('change', (type, filename) => {
if (type === 'rename' && filename === '.eslint_d') {
clearTimeout(timeout);
watcher.close();
resolve();
}
})
.on('error', (err) => {
clearTimeout(timeout);
reject(err);
});
timeout = setTimeout(() => {
watcher.close();
timeout = null;
reject(new Error('Timed out waiting for config'));
}, 2000);

While eslint_d trys to look for the config file inside the eslint directory, the variable base here is a virtual path, such as /Users/Workspace/.yarn/__virtual__/eslint-virtual-190d1c9405/0/cache/eslint-npm-9.19.0-e70f56e959-850d19fd6a.zip/node_modules/eslint, while using Yarn berry pnp mode. As a result, .eslint_d can't be found.

Currently, I can resolve this problem by unplugging eslint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant