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

Bug: Not working via pnpm #10

Closed
JaavierR opened this issue Jan 25, 2022 · 3 comments
Closed

Bug: Not working via pnpm #10

JaavierR opened this issue Jan 25, 2022 · 3 comments

Comments

@JaavierR
Copy link

JaavierR commented Jan 25, 2022

As the title says when installing the dependency using the pnpm add -D prettier-plugin-tailwindcss command and then running pnpm prettier --write, these new rules are not taken into account. I tried deleting the node_modules folder, to reinstall everything and it didn't work either.

After this, I deleted the node_modules folder again to install using yarn, thinking that it is the package manager and when I executed the command it did apply the new order rules in all the corresponding files. I don't know what this is due to or if it has to do with the way pnpm handles packages.

My current prettier version is 2.5.1 and the prettier-plugin-tailwindcss is the latest (0.1.3).

@bradlc
Copy link
Contributor

bradlc commented Jan 25, 2022

Hey @JaavierR. Prettier plugin autoloading is not supported when using pnpm (see prettier/prettier#8474 and prettier/prettier#11008), so you need to add the plugin to your Prettier config manually, for example:

// prettier.config.js
module.exports = {
  plugins: [require('prettier-plugin-tailwindcss')],
}

@brandonpittman
Copy link

Just hit this as well. Might be nice to add this disclaimer to the Readme.

@mrienstra
Copy link

The README now calls this out, thanks to #47

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

4 participants