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.

Plugin is not loaded when using pnpm

See original GitHub issue

First, thanks for your hard work on this plugin!

When installing dependencies using pnpm and then running prettier I get the warning: Ignored unknown option { importOrder: [...] }.

If I remove node_modules, install dependencies with npm, and then run prettier, the files are formatted as expected.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:6
  • Comments:5

github_iconTop GitHub Comments

16reactions
nirtamir2commented, Jan 22, 2022

Inspired by https://github.com/simonhaenisch/prettier-plugin-organize-imports/issues/34#issuecomment-934676163 I solved it by adding to .prettierrc.js:

module.exports = {
  plugins: [
    require.resolve("@trivago/prettier-plugin-sort-imports"),
  ],
};
1reaction
ayusharmacommented, Aug 6, 2021

The reason is that the prettier plugins are picked automatically from the node_modules and the pnpm has a different architecture. I think this issue is out of scope of this plugin and requires discussion in the prettier project.

Read more comments on GitHub >

github_iconTop Results From Across the Web

pnpm/pnpm - Gitter
I created a new project using pnpm, installed some packages, but eslint is unable to ... The TSLint plugin loading would /not/ get...
Read more >
package.json | pnpm
During local development, pnpm will always fail with an error message if its version does not match the one specified in the engines...
Read more >
Prettier plugin does not support local installation with pnpm
use IntelliJ and open a Java project · install the Prettier plugin · install prettier and prettier-plugin-java locally with npm · configure your...
Read more >
Troubleshooting - Vite
Switch to another package manager (e.g. pnpm , yarn ); Remove & from the path to your project. Dev Server #. Requests are...
Read more >
gatsby-plugin-pnpm
When using pnpm , building a Gatsby project will fail because pnpm uses a unique node_modules structure, and webpack doesn't know how to...
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