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

Support for yarn pnp #42

Open
GabeDuarteM opened this issue Apr 5, 2023 · 0 comments
Open

Support for yarn pnp #42

GabeDuarteM opened this issue Apr 5, 2023 · 0 comments

Comments

@GabeDuarteM
Copy link

I have a project using yarn pnp + workspaces (yarn monorepo), and because of the way yarn deals with packages in this mode, we end up having no node_modules folder. Is there already support for yarn PnP with stylelint-lsp?

I'm using the native lsp with neovim, when I open up a project that doesn't use PnP stylelint-lsp seems to work without a problem, but when opening up one that uses it, I get this error on the logs:

[ERROR][2023-04-05 18:46:26] .../vim/lsp/rpc.lua:733	"rpc"	"stylelint-lsp"	"stderr"	'Error when trying to validate file:///[[filepath-censored]] Error: Could not find "stylelint-config-standard". Do you need a `configBasedir`?\n    at module.exports (/home/gabe/.local/share/nvim/mason/packages/stylelint-lsp/node_modules/stylelint-lsp/node_modules/stylelint/lib/utils/configurationError.js:10:14)\n    at getModulePath (/home/gabe/.local/share/nvim/mason/packages/stylelint-lsp/node_modules/stylelint-lsp/node_modules/stylelint/lib/utils/getModulePath.js:27:9)\n    at loadExtendedConfig (/home/gabe/.local/share/nvim/mason/packages/stylelint-lsp/node_modules/stylelint-lsp/node_modules/stylelint/lib/augmentConfig.js:190:21)\n    at /home/gabe/.local/share/nvim/mason/packages/stylelint-lsp/node_modules/stylelint-lsp/node_modules/stylelint/lib/augmentConfig.js:167:11 {\n  code: 78\n}\n'

So it seems that the LSP cannot find the installed packages (its probably looking inside node_modules). When I open VSCode with the vscode-styling extension everything seems to work fine. When looking for pnp on their repo, seems like they added support for it on stylelint/vscode-stylelint#272.
Do you think it would be possible to add support to it on stylelint-lsp (assuming it doesn't already have it)?

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