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.

Allow multiple paths for prettierPath

See original GitHub issue

Is your feature request related to a problem? Please describe. I’m using a multi-root workspace in vscode. One of the projects is using yarn v2 which means that prettier isn’t located in node_modules anymore. I have to change prettier.prettierPath to "prettier.prettierPath": ".vscode/pnpify/prettier". However, prettier.prettierPath is ignored for multi-root workspaces and I get “Failed to load module. If you have prettier or plugins […]”. If I open only the project folder everything works fine.

Describe the solution you’d like Overload prettierPath with an array of strings. The extension would look for prettier in each path (left to right) and use the first one it found. For my particular problem I’d use "prettier.prettierPath": ["node_modules/prettier", ".vscode/pnpify/prettier"].

It might be an issue with how the extension is loaded entirely.

Describe alternatives you’ve considered Drop the extension. Multi-root workspaces are far better for my productivity than the extensions.

Adopting yarn v2 in every project is not viable.

Additional context

Would love to implement this if the proposal is accepted.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:8
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
eps1loncommented, Jul 27, 2021

Closing as there has been no activity on this in more than a year.

Would’ve been nice to let us know that you don’t plan to work on this issue. I don’t believe you wanted us to spam “any updates?” every few weeks, no?

3reactions
ntottencommented, Jul 26, 2021

Closing as there has been no activity on this in more than a year.

Read more comments on GitHub >

github_iconTop Results From Across the Web

In VS Code, I'm getting this error, 'Failed to load module ...
I've installed Prettier globally. When I go into VS Code settings, I search for Prettier Path . I see 2 options here, Prettier:Config...
Read more >
Configuration File - Prettier
Overrides let you have different configuration for certain file extensions, folders and specific files. Prettier borrows ESLint's override format. JSON: { "semi ...
Read more >
How to configure Prettier and VSCode - Gleb Bahmutov
Run Prettier from ESLint. Since ESLint can detect and fix many of the errors it detects automatically, let's tell ESLint to run Prettier...
Read more >
Prettier not working in VS code - Salesforce Stack Exchange
Installed Prettier and selected Prettier as the 'Default Formatter' for both User and Workspace. Installed node js. Ran the command npm install.
Read more >
Multi-root Workspaces in Visual Studio Code
You can open and work on multiple project folders in Visual Studio Code with ... set the correct folder paths relative to the...
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